GabBiswajit / BankNote

A Bank Note Plugin For Pocketmine 5.0.0
Apache License 2.0
2 stars 0 forks source link

Error on Command #2

Closed ParadoxPlays closed 10 months ago

ParadoxPlays commented 10 months ago

Server Version: 1.20.50 Pocketmine Version: 5.10.0

Error: THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: BankNote

Thread: Main Error: Call to undefined method cooldogedev\BedrockEconomy\BedrockEconomy::getAPI() File: plugins/BankNote.phar/src/Biswajit/BankNote/libs/davidglitch04/libEco/libEco Line: 49 Type: Error Backtrace:

0 plugins/BankNote.phar/src/Biswajit/BankNote/BankNote(39): Biswajit\BankNote\libs\davidglitch04\libEco\libEco::myMoney(object pocketmine\player\Player#199460, object Closure#94290)

1 pmsrc/src/command/PluginCommand(46): Biswajit\BankNote\BankNote->onCommand(object pocketmine\player\Player#199460, object pocketmine\command\PluginCommand#51968, string[8] banknote, array[1])

2 pmsrc/src/command/SimpleCommandMap(212): pocketmine\command\PluginCommand->execute(object pocketmine\player\Player#199460, string[8] banknote, array[1])

3 pmsrc/src/Server(1425): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#199460, string[12] banknote 100)

4 pmsrc/src/player/Player(1512): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#199460, string[12] banknote 100)

5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(821): pocketmine\player\Player->chat(string[13] /banknote 100)

6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#94293)

7 pmsrc/src/network/mcpe/NetworkSession(448): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#94808)

8 pmsrc/src/network/mcpe/NetworkSession(386): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#94293, string[35] M./banknote 100.*F.g!qgi.#}.......H)

9 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[38] S...OJ..../IU040`.rkLW,L.<..8...m....)

10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[47] ...piZ.-...z.Bk.....y....^C...B..g....f...9.K..)

11 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#199585)

12 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}()

13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine{closure}()

14 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()

15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()

16 pmsrc/src/Server(1690): pocketmine\snooze\SleeperHandler->sleepUntil(float 1705536572.2786)

17 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()

18 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)

19 pmsrc/src/PocketMine(364): pocketmine\server()

20 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Code: [40] @return int [41] / [42] public static function myMoney(Player $player, Closure $callback): void [43] { [44] if (self::getEconomy()[0] === Utils::ECONOMYAPI) { [45] $money = self::getEconomy()[1]->myMoney($player); [46] assert(is_float($money)); [47] $callback($money); [48] } elseif (self::getEconomy()[0] === Utils::BEDROCKECONOMYAPI) { [49] self::getEconomy()[1]->getAPI()->getPlayerBalance($player->getName(), ClosureContext::create(static function (?int $balance) use ($callback): void { [50] $callback($balance ?? 0); [51] })); [52] } [53] } [54] [55] public static function addMoney(Player $player, int $amount): void [56] { [57] if (self::getEconomy()[0] === Utils::ECONOMYAPI) { [58] self::getEconomy()[1]->addMoney($player, $amount); [59] } elseif (self::getEconomy()[0] === Utils::BEDROCKECONOMYAPI) {

GabBiswajit commented 10 months ago

Please check your economy plugin!

ParadoxPlays commented 10 months ago

I'm using the latest version of Bedrock Economy