iRainDropp / CPS

A fully customizable CPS plugin for PocketMine-MP servers.
MIT License
4 stars 10 forks source link

bug #9

Closed Driwen closed 2 years ago

Driwen commented 2 years ago

why my server crash :

crashdump:

Error: Undefined array key "OnTheTop6226" File: plugins/CPS_dev-43.phar/src/iRainDrop/CPS/EventListener Line: 84 Type: ErrorException

THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: CPS

Code: [75] } [76] } [77] } [78] } [79] } [80] } [81] if($packet instanceof InventoryTransactionPacket){ [82] if($packet->trData instanceof UseItemOnEntityTransactionData){ [83] $this->addCPS($event->getOrigin()->getPlayer()); [84] if(Main::$cpsEnabled[$event->getOrigin()->getPlayer()->getName()] === true){ [85] $popup = str_replace("{cps}", $this->getCPS($event->getOrigin()->getPlayer()), Main::$config->getNested("CPS.Popup")); [86] $event->getOrigin()->getPlayer()->sendPopup($popup); [87] } [88] if($this->getCPS($event->getOrigin()->getPlayer()) >= Main::$config->getNested("CPS.Trigger Amount")){ [89] $players = server::getInstance()->getOnlinePlayers(); [90] [91] if(!$this->hasCooldown($event->getOrigin()->getPlayer())){ [92] if(Main::$config->getNested("Discord Webhook.Enabled") === true){ [93] $webhook = new Webhook(Main::$config->getNested("Discord Webhook.Webhook URL")); [94] $msg = new Message();

iRainDropp commented 2 years ago

What version of PocketMine-MP is your server using?

Driwen commented 2 years ago

I use the version 4.2.4

iRainDropp commented 2 years ago

What did you do exactly before this occurred?

Driwen commented 2 years ago

nothing I just put the basic plugin. Only my server is connected about 40 and my server crashes

iRainDropp commented 2 years ago

Alright, I'm pretty sure I got a patch for the issue. I'll update the code whenever I get the time.

Driwen commented 2 years ago

Ok thx

Driwen commented 2 years ago

Is it patch ?

iRainDropp commented 2 years ago

Yes, the bug should be patched. If you run into this error again please let me know, make sure to update your version of the plugin to the latest.