PHP: // $player = array_shift($params);// $amount = array_shift($params);$this->plugin->reduceMoney($player, $amount);// to take money PHP: if($amount < 0){// do cancel}
Took from Economys Github page You can access to EconomyAPI by using PHP: EconomyAPI::getInstance() Example: PHP: EconomyAPI::getInstance()->addMoney($player, $amount);
PHP: EconomyAPI::reduceMoney($player, $amount, $force = false, $issuer = "none"); Set $force to true and money will be taken even if player don't have enough money. Sorry I'm wrong. If you put $force to true it will ignore cancelled ReduceMoneyEvent.
Why ask so much? Read it yourself. https://github.com/onebone/EconomyS...PI/src/onebone/economyapi/EconomyAPI.php#L246