menu
#5038367 mt_rand() expects parameter 2 to be int, float given

Submitted by PocketMine-MP 3.22.0

General information

Version: 3.22.0
Git commit: c32c2146
Plugin involvement: Direct
Report date: 2021-07-22 03:02:32 +0000 UTC
Server uptime: 0 days 0 hours 1 minutes 21 seconds

System Information

PHP version: 7.4.20
Operating system: linux
System banner: Linux vanitymcpe 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the UnickornCE plugin was directly involved in this crash. Please contact the plugin author.
Message: mt_rand() expects parameter 2 to be int, float given
File: plugins/Season5CE (14).phar/src/Unickorn/UnickornCE/handlers/LuckyHandler
Line: #54
Error level: TypeError
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
		$hand = $player->getInventory()->getItemInHand();
$lb = Item::get(82, 0, 1);
$lb->setCustomName(TF::RESET . TF::BOLD . TF::GOLD . "Lucky Block");
$lucky = $event->getPlayer()->getInventory()->getItemInHand()->getEnchantmentLevel(CustomIDs::LUCKY);
$drops = $event->getDrops();
if($hand->hasEnchantment(CustomIDs::ENDER)) {
if(!$player->hasPermission("ender.disable") || ($player->isOp())) {
foreach ($drops as $data => $count) {
for($i = 0; $i < $count/3; $i++) {
if(mt_rand(1, (900 - ($lucky * 100))/3) === 1){
$player->getInventory()->addItem($lb);
$player->sendMessage("§l§5Vqnity§fPE §7> §r§fYou received §b1x Lucky Block §7from Lucky Enchant.");
}
}
}
}
}
}
}
#0 plugins/Season5CE (14).phar/src/Unickorn/UnickornCE/handlers/LuckyHandler(54): mt_rand(integer 1, double 266.66666666667)
#1 pmsrc/src/pocketmine/plugin/MethodEventExecutor(42): Unickorn\UnickornCE\handlers\LuckyHandler->onJackhammerEvent(object Unickorn\UnickornCE\events\JackhammerBreakEvent)
#2 pmsrc/src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object Unickorn\UnickornCE\handlers\LuckyHandler, object Unickorn\UnickornCE\events\JackhammerBreakEvent)
#3 pmsrc/src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object Unickorn\UnickornCE\events\JackhammerBreakEvent)
#4 plugins/MineReset_v3.2.2-Vqnity (1).phar/src/falkirks/minereset/Mine(197): pocketmine\event\Event->call()
#5 plugins/MineReset_v3.2.2-Vqnity (1).phar/src/falkirks/minereset/asynciterator/AsyncIteratorTask(22): falkirks\minereset\Mine->falkirks\minereset\{closure}()
#6 (): falkirks\minereset\asynciterator\AsyncIteratorTask::falkirks\minereset\asynciterator\{closure}()
#7 plugins/MineReset_v3.2.2-Vqnity (1).phar/src/falkirks/minereset/asynciterator/AsyncIteratorTask(29): Generator->send(boolean 1)
#8 pmsrc/src/pocketmine/scheduler/TaskHandler(137): falkirks\minereset\asynciterator\AsyncIteratorTask->onRun(integer 1607)
#9 pmsrc/src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 1607)
#10 pmsrc/src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1607)
#11 pmsrc/src/pocketmine/Server(2389): pocketmine\plugin\PluginManager->tickSchedulers(integer 1607)
#12 pmsrc/src/pocketmine/Server(2152): pocketmine\Server->tick()
#13 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
#14 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
#15 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/pris/test/, string[24] /home/pris/test/plugins/)
#16 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
#17 pmsrc(11): require(string[71] phar:///home/pris/test/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show