error: PHP: [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'ExonCore v1.0.0': Cannot send empty batch on ExonCore\crate\EventListener[13:42:02] [Server thread/CRITICAL]: InvalidArgumentException: "Cannot send empty batch" (EXCEPTION) in "src/pocketmine/Server" at line 1852 code: PHP: public function remove(array $players = null): void{ $this->particle->setInvisible(); if($players == null){ $players = Core::get()->getServer()->getOnlinePlayers(); } foreach($players as $player) Core::get()->getServer()->getDefaultLevel()->addParticle($this->particle, [$player]); } Interact: PHP: public function onInteract(PlayerInteractEvent $e): void{ #$this->text = new FloatingTextPM(new Vector3(274, 136, 70), "", ""); $player = $e->getPlayer(); $block = $e->getBlock(); $x = $block->getX(); $y = $block->getY(); $z = $block->getZ(); $manager = new FloatingTextManager(); if($player instanceof ExonPlayer){ if($block->getId() == Block::CHEST){ if($x == 274 && $y = 135 && $z = 70){ $e->setCancelled(); if(!$player->getCfg($player)->get("vote") >= 1){ $player->sendMessage(C::RED . "You don't have vote key."); #$this->text->setText("1"); #$player->getLevel()->addParticle($this->text); $manager->setName("hi"); $manager->add([$player], true); return; }else{ $manager->remove([$player]); return; } } } } }
PHP: Core::get()->getServer()->getDefaultLevel()->addParticle($this->particle, [$player]); Replace [$player] with $players.