menu
#2821884 Object of class pocketmine\item\enchantment\SharpnessEnchantment could not be converted to string

Submitted by PocketMine-MP 3.9.4

General information

Version: 3.9.4
Git commit: 1be6783c
Plugin involvement: Direct
Report date: 2019-09-10 16:32:31 +0000 UTC

System Information

PHP version: 7.3.7
Operating system: linux
System banner: Linux 24f3a6dd9bdb 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64

Error information

Warning: the PiggyCustomEnchants plugin was directly involved in this crash. Please contact the plugin author.
Message: Object of class pocketmine\item\enchantment\SharpnessEnchantment could not be converted to string
File: plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/Main
Line: #579
Error level: ErrorException
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
     * @param      $enchant
* @param $level
* @return bool|int
*/
public function canBeEnchanted(Item $item, $enchant, $level)
{
if ($enchant instanceof EnchantmentInstance) {
$enchant = $enchant->getType();
} elseif ($enchant instanceof CustomEnchants !== true) {
$this->getLogger()->error("Argument '$enchant' must be an instance EnchantmentInstance or CustomEnchants.");
return false;
}
$type = $this->getEnchantType($enchant);
if ($this->getEnchantMaxLevel($enchant) < $level) {
return self::MAX_LEVEL;
}
foreach ($this->incompatibilities as $enchantment => $incompatibilities) {
if ($item->getEnchantment($enchantment) !== null) {
if (in_array($enchant->getId(), $incompatibilities)) {
return self::NOT_COMPATIBLE_WITH_OTHER_ENCHANT;
#0 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/Main(579): pocketmine\utils\Utils::errorExceptionHandler(integer 4096, string[97] Object of class pocketmine\item\enchantment\SharpnessEnchantment could not be co, string[97] phar:///aternos/server/plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustom, integer 579, array[3])
#1 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/Main(507): DaPigGuy\PiggyCustomEnchants\Main->canBeEnchanted(object pocketmine\item\Sword, object pocketmine\item\enchantment\SharpnessEnchantment, string[4] 1000)
#2 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/Commands/CustomEnchantCommand(343): DaPigGuy\PiggyCustomEnchants\Main->addEnchantment(object pocketmine\item\Sword, array[1], array[1], boolean 1, object pocketmine\Player)
#3 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/Commands/CustomEnchantCommand(82): DaPigGuy\PiggyCustomEnchants\Commands\CustomEnchantCommand->enchant(object pocketmine\Player, string[1] 9, string[4] 1000, object pocketmine\Player)
#4 src/pocketmine/command/SimpleCommandMap(270): DaPigGuy\PiggyCustomEnchants\Commands\CustomEnchantCommand->execute(object pocketmine\Player, string[2] ce, array[4])
#5 src/pocketmine/Server(2029): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\Player, string[26] ce enchant 9 1000 MootAdam)
#6 plugins/Slapper.phar/src/slapper/Main(170): pocketmine\Server->dispatchCommand(object pocketmine\Player, string[26] ce enchant 9 1000 MootAdam)
#7 src/pocketmine/command/PluginCommand(58): slapper\Main->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[3] rca, array[5])
#8 src/pocketmine/command/SimpleCommandMap(270): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[3] rca, array[6])
#9 src/pocketmine/Server(2029): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[32] rca m ce enchant 9 1000 MootAdam)
#10 src/pocketmine/Server(1616): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[32] rca m ce enchant 9 1000 MootAdam)
#11 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#12 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#13 src/pocketmine/Server(2348): pocketmine\snooze\SleeperHandler->sleepUntil(double 1568133151.8634)
#14 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#15 src/pocketmine/Server(1784): pocketmine\Server->start()
#16 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /aternos/server/, string[24] /aternos/server/plugins/)
#17 src/pocketmine/PocketMine(299): pocketmine\server()
#18 (1): require(string[64] phar:///aternos/server/server.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show