DaPigGuy / PiggyCustomEnchants

An open source custom enchantment plugin for PocketMine-MP
https://piggydocs.aericio.net/PiggyCustomEnchants.html
Apache License 2.0
103 stars 118 forks source link

Could not execute task PiggyCustomEnchants\Tasks\UseEnchantedBookTask: #108

Closed teracube closed 6 years ago

teracube commented 6 years ago

Please make sure your issue complies with these guidelines:

General

Could not execute task PiggyCustomEnchants\Tasks\UseEnchantedBookTask: Argument 1 passed to PiggyCustomEnchants\Main::getEnchantType() must be an instance of pocketmine\item\enchantment\Enchantment given, called in phar:///home/gsp_1485/g3.hmserv.eu-19144/plugins/PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main.php on line 709

Version of PiggyCustomEnchants:

PiggyCustomEnchants_dev-190.phar

Steps to Reproduce the Issue

  1. PocketMine-MP version 1.7dev-591 "[REDACTED]" (API 3.0.0-ALPHA10)
  2. PiggyCustomEnchants v1.1.0

sorry i don't know how to reproduce this issue

Extra Information


2018-01-05 [13:23:14] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to PiggyCustomEnchants\Main::getEnchantType() must be an instance of PiggyCustomEnchants\CustomEnchants\CustomEnchants, instance of pocketmine\item\enchantment\Enchantment given, called in phar:///home/gsp_1485/g3.hmserv.eu-19144/plugins/PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main.php on line 709" (EXCEPTION) in "PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main" at line 553
2018-01-05 [13:23:14] [Server thread/DEBUG]: #0 PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main(709): PiggyCustomEnchants\Main->getEnchantType(pocketmine\item\enchantment\Enchantment object)
2018-01-05 [13:23:14] [Server thread/DEBUG]: #1 PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Tasks/UseEnchantedBookTask(44): PiggyCustomEnchants\Main->canBeEnchanted(pocketmine\item\Sword object, pocketmine\item\enchantment\Enchantment object, integer 3)
2018-01-05 [13:23:14] [Server thread/DEBUG]: #2 src/pocketmine/scheduler/TaskHandler(160): PiggyCustomEnchants\Tasks\UseEnchantedBookTask->onRun(integer 568281)
2018-01-05 [13:23:14] [Server thread/DEBUG]: #3 src/pocketmine/scheduler/ServerScheduler(326): pocketmine\scheduler\TaskHandler->run(integer 568281)
2018-01-05 [13:23:14] [Server thread/DEBUG]: #4 src/pocketmine/Server(2533): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 568281)
2018-01-05 [13:23:14] [Server thread/DEBUG]: #5 src/pocketmine/Server(2276): pocketmine\Server->tick()
2018-01-05 [13:23:14] [Server thread/DEBUG]: #6 src/pocketmine/Server(2151): pocketmine\Server->tickProcessor()
2018-01-05 [13:23:14] [Server thread/DEBUG]: #7 src/pocketmine/Server(1739): pocketmine\Server->start()
2018-01-05 [13:23:14] [Server thread/DEBUG]: #8 src/pocketmine/PocketMine(554): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/gsp_1485/g3.hmserv.eu-19144/, string /home/gsp_1485/g3.hmserv.eu-19144/plugins/)
2018-01-05 [13:23:14] [Server thread/DEBUG]: #9 /home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar(1): require(string phar:///home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
2018-01-05 [13:23:22] [Server thread/INFO]: - **** ][ LPBchouchDz69 - > Thefulldiams
2018-01-05 [13:23:25] [Server thread/CRITICAL]: Could not execute task PiggyCustomEnchants\Tasks\UseEnchantedBookTask: Argument 1 passed to PiggyCustomEnchants\Main::getEnchantType() must be an instance of PiggyCustomEnchants\CustomEnchants\CustomEnchants, instance of pocketmine\item\enchantment\Enchantment given, called in phar:///home/gsp_1485/g3.hmserv.eu-19144/plugins/PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main.php on line 709
2018-01-05 [13:23:25] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to PiggyCustomEnchants\Main::getEnchantType() must be an instance of PiggyCustomEnchants\CustomEnchants\CustomEnchants, instance of pocketmine\item\enchantment\Enchantment given, called in phar:///home/gsp_1485/g3.hmserv.eu-19144/plugins/PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main.php on line 709" (EXCEPTION) in "PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main" at line 553
2018-01-05 [13:23:25] [Server thread/DEBUG]: #0 PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Main(709): PiggyCustomEnchants\Main->getEnchantType(pocketmine\item\enchantment\Enchantment object)
2018-01-05 [13:23:25] [Server thread/DEBUG]: #1 PiggyCustomEnchants_dev-190.phar/src/PiggyCustomEnchants/Tasks/UseEnchantedBookTask(44): PiggyCustomEnchants\Main->canBeEnchanted(pocketmine\item\ItemBlock object, pocketmine\item\enchantment\Enchantment object, integer 3)
2018-01-05 [13:23:25] [Server thread/DEBUG]: #2 src/pocketmine/scheduler/TaskHandler(160): PiggyCustomEnchants\Tasks\UseEnchantedBookTask->onRun(integer 568514)
2018-01-05 [13:23:25] [Server thread/DEBUG]: #3 src/pocketmine/scheduler/ServerScheduler(326): pocketmine\scheduler\TaskHandler->run(integer 568514)
2018-01-05 [13:23:25] [Server thread/DEBUG]: #4 src/pocketmine/Server(2533): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 568514)
2018-01-05 [13:23:25] [Server thread/DEBUG]: #5 src/pocketmine/Server(2276): pocketmine\Server->tick()
2018-01-05 [13:23:25] [Server thread/DEBUG]: #6 src/pocketmine/Server(2151): pocketmine\Server->tickProcessor()
2018-01-05 [13:23:25] [Server thread/DEBUG]: #7 src/pocketmine/Server(1739): pocketmine\Server->start()
2018-01-05 [13:23:25] [Server thread/DEBUG]: #8 src/pocketmine/PocketMine(554): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/gsp_1485/g3.hmserv.eu-19144/, string /home/gsp_1485/g3.hmserv.eu-19144/plugins/)
2018-01-05 [13:23:25] [Server thread/DEBUG]: #9 /home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar(1): require(string phar:///home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar/src/pocketmine/PocketMine.php)```
teracube commented 6 years ago

Teaspoon was removed of the server 2 days before this issue .

Le vendredi 5 janvier 2018, QuiverlyRivalry notifications@github.com a écrit :

Blame teaspoon

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DaPigGuy/PiggyCustomEnchants/issues/108#issuecomment-355652384, or mute the thread https://github.com/notifications/unsubscribe-auth/Acb8lAhuLM6UEO_OymEvfpfQn45JDvRgks5tHoCggaJpZM4RUcej .

DaPigGuy commented 6 years ago

Are you trying to use enchanted books with normal enchants?

teracube commented 6 years ago

@DaPigGuy no i don’t know how to reproduce this issue sorry

DaPigGuy commented 6 years ago

Would you mind trying to enchant an enchanted book with any vanilla enchant and using it on an item?