menu
#3235658 str_repeat(): Second argument has to be greater than or equal to 0

Submitted by PocketMine-MP 3.9.7

General information

Version: 3.9.7
Git commit: 0c91d568
Plugin involvement: Direct
Report date: 2019-12-01 01:51:49 +0000 UTC

System Information

PHP version: 7.3.8
Operating system: linux
System banner: Linux 598a0af721bc 4.4.0-164-generic #192-Ubuntu SMP Fri Sep 13 12:02:50 UTC 2019 x86_64

Error information

Warning: the PiggyCustomEnchants plugin was directly involved in this crash. Please contact the plugin author.
Message: str_repeat(): Second argument has to be greater than or equal to 0
File: plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/enchants/armor/boots/JetpackEnchant
Line: #93
Error level: ErrorException
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
     */
public function tick(Player $player, Item $item, Inventory $inventory, int $slot, int $level): void
{
if ($this->hasActiveJetpack($player)) {
$player->setMotion($player->getDirectionVector()->multiply($level));
$player->resetFallDistance();
$player->getLevel()->addParticle(new GenericParticle($player, 63));

$time = ceil($this->powerRemaining[$player->getName()] / 10);
$player->sendTip(($time > 10 ? TextFormat::GREEN : ($time > 5 ? TextFormat::YELLOW : TextFormat::RED)) . "Power: " . str_repeat("|", (int)$time));
if ($time <= 2) $player->sendTip(TextFormat::RED . "Jetpack low on power.");
if ($player->getServer()->getTick() % 20 === 0) {
$this->powerRemaining[$player->getName()]--;
if ($this->powerRemaining[$player->getName()] <= 0) {
$this->powerActiveJetpack($player, false);
return;
}
}
}
}
#0 (): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[66] str_repeat(): Second argument has to be greater than or equal to 0, string[128] phar:///aternos/server/plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustom, integer 93, array[6])
#1 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/enchants/armor/boots/JetpackEnchant(93): str_repeat(string[1] |, integer -1)
#2 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/enchants/traits/TickingTrait(45): DaPigGuy\PiggyCustomEnchants\enchants\armor\boots\JetpackEnchant->tick(object pocketmine\Player, object pocketmine\item\DiamondBoots, object pocketmine\inventory\ArmorInventory, integer 3, integer 3)
#3 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/tasks/TickEnchantmentsTask(86): DaPigGuy\PiggyCustomEnchants\enchants\armor\boots\JetpackEnchant->onTick(object pocketmine\Player, object pocketmine\item\DiamondBoots, object pocketmine\inventory\ArmorInventory, integer 3, integer 3)
#4 src/pocketmine/scheduler/TaskHandler(159): DaPigGuy\PiggyCustomEnchants\tasks\TickEnchantmentsTask->onRun(integer 34283)
#5 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 34283)
#6 src/pocketmine/plugin/PluginManager(681): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 34283)
#7 src/pocketmine/Server(2570): pocketmine\plugin\PluginManager->tickSchedulers(integer 34283)
#8 src/pocketmine/Server(2346): pocketmine\Server->tick()
#9 src/pocketmine/Server(2206): pocketmine\Server->tickProcessor()
#10 src/pocketmine/Server(1784): pocketmine\Server->start()
#11 src/pocketmine/PocketMine(278): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /aternos/server/, string[24] /aternos/server/plugins/)
#12 src/pocketmine/PocketMine(300): pocketmine\server()
#13 (1): require(string[64] phar:///aternos/server/server.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show