Please edit this code, code was crashed my serwer :_: PHP: public function onBreak(BlockBreakEvent $event){ if(!($event->getPlayer()->hasPermission("turbodrop.blokada"))) { if($this->disableTurboDrop) { $player = $event->getPlayer(); $block = $event->getBlock(); $gracz = $event->getPlayer()->getName(); if($event->getBlock()->getId() == 1){ switch(mt_rand(1,200)){ case 1: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) diamond • "); $player->getInventory()->addItem(Item::get(264, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 2: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) diamond • "); $player->getInventory()->addItem(Item::get(264, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 3: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) diamond • "); $player->getInventory()->addItem(Item::get(264, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 4: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) iron ingot • "); $player->getInventory()->addItem(Item::get(265, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 5: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) iron ingot • "); $player->getInventory()->addItem(Item::get(265, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 6: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) iron ingot • "); $player->getInventory()->addItem(Item::get(265, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 7: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) gold ingot • "); $player->getInventory()->addItem(Item::get(266, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 8: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) gold ingot • "); $player->getInventory()->addItem(Item::get(266, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 9: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) gold ingot • "); $player->getInventory()->addItem(Item::get(266, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 10: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) emerald • "); $player->getInventory()->addItem(Item::get(388, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 11: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) emerald • "); $player->getInventory()->addItem(Item::get(388, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 12: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) emerald • "); $player->getInventory()->addItem(Item::get(388, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 13; $player->sendMessage("§a • [DROP] Wydropiłeś - (1) lapis lazuli • "); $player->getInventory()->addItem(Item::get(351, 4, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 14; $player->sendMessage("§a • [DROP] Wydropiłeś - (2) lapis lazuli • "); $player->getInventory()->addItem(Item::get(351, 4, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 15; $player->sendMessage("§a • [DROP] Wydropiłeś - (3) lapis lazuli • "); $player->getInventory()->addItem(Item::get(351, 4, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 16: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) redstone • "); $player->getInventory()->addItem(Item::get(331, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 17: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) redstone • "); $player->getInventory()->addItem(Item::get(331, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 18: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) redstone • "); $player->getInventory()->addItem(Item::get(331, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 19: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) coal • "); $player->getInventory()->addItem(Item::get(263, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 20: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) coal • "); $player->getInventory()->addItem(Item::get(263, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 21: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) coal • "); $player->getInventory()->addItem(Item::get(263, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 22: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) obsidian • "); $player->getInventory()->addItem(Item::get(49, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 23: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) obsidian • "); $player->getInventory()->addItem(Item::get(49, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 24: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) obsidian • "); $player->getInventory()->addItem(Item::get(49, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 25: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) apple • "); $player->getInventory()->addItem(Item::get(260, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 26: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) apple • "); $player->getInventory()->addItem(Item::get(260, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 27: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) apple • "); $player->getInventory()->addItem(Item::get(260, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; case 28: $player->sendMessage("§a • [DROP] Wydropiłeś - Szybkie kopanie • "); $effect = Effect::getEffect(3); $effect->setDuration(600); $player->addEffect($effect); $player->addExperience(5); $event->setCancelled(true); break; case 29: $monety1 = "givemonety $gracz 500"; $this->getServer()->dispatchCommand(new ConsoleCommandSender,$monety1); $player->sendMessage("§a • [DROP] Wydropiłeś - (500) monet • "); $player->addExperience(5); $event->setCancelled(true); break; case 30: $monety2 = "givemonety $gracz 750"; $this->getServer()->dispatchCommand(new ConsoleCommandSender,$monety2); $player->sendMessage("§a • [DROP] Wydropiłeś - (750) monet • "); $player->addExperience(5); $event->setCancelled(true); break; case 31: $monety3 = "givemonety $gracz 1000"; $this->getServer()->dispatchCommand(new ConsoleCommandSender,$monety3); $player->sendMessage("§a • [DROP] Wydropiłeś - (1000) monet • "); $player->addExperience(5); $event->setCancelled(true); break; case 32: $player->sendMessage("§a • [DROP] Wydropiłeś - (1) TnT • "); $player->getInventory()->addItem(Item::get(46, 0, 1)); $player->addExperience(5); $event->setCancelled(true); break; case 33: $player->sendMessage("§a • [DROP] Wydropiłeś - (2) TnT • "); $player->getInventory()->addItem(Item::get(46, 0, 2)); $player->addExperience(5); $event->setCancelled(true); break; case 34: $player->sendMessage("§a • [DROP] Wydropiłeś - (3) TnT • "); $player->getInventory()->addItem(Item::get(46, 0, 3)); $player->addExperience(5); $event->setCancelled(true); break; } public function onCommand(CommandSender $sender, Command $command, $label, array $args){ switch($command->getName()){ case "turbodrop": if(!(isset($args[0]))){ $sender->sendMessage("§a • Informacje o - (TurboDrop) • "); $sender->sendMessage("§f • Wpisz - /turbodrop on Aby włączyć turbodrop • "); $sender->sendMessage("§f • Wpisz - /chat off Aby wyłączyć turbodrop• "); return true; } if($args[0] == "off"){ $sender->sendMessage("§c • TurboDrop został wyłączony • "); $this->disableTurboDrop = true; return true; } elseif($args[0] == "on"){ $sender->sendMessage("§a • TurboDrop został włączony • "); $this->disableTurboDrop = false; return true;
don't hardcode that much -_- and also: please show us the error message. We're not a throwcodeatusandwewillfixit service.