1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

I Dont know what wrong?

Discussion in 'Help' started by Fineeno, Feb 24, 2018.

  1. Fineeno

    Fineeno Creeper

    Messages:
    2
    GitHub:
    FIneno
    error
    [13:02:02] [Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\item\enchantment\Enchantment::setLevel()" (EXCEPTION) in "SnowixAPI/src/plugin/main" at line 116
    [13:02:02] [Server thread/DEBUG]: #0 src/pocketmine/plugin/MethodEventExecutor(38): plugin\main->JoinItems(pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(plugin\main object, pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #2 src/pocketmine/plugin/PluginManager(687): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #3 src/pocketmine/Player(966): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #4 src/pocketmine/Player(914): pocketmine\Player->doFirstSpawn()
    [13:02:02] [Server thread/DEBUG]: #5 src/pocketmine/level/Level(2552): pocketmine\Player->sendChunk(integer 8, integer 11, pocketmine\network\mcpe\protocol\BatchPacket object)
    [13:02:02] [Server thread/DEBUG]: #6 src/pocketmine/level/Level(2571): pocketmine\level\Level->sendChunkFromCache(integer 8, integer 11)
    [13:02:02] [Server thread/DEBUG]: #7 src/pocketmine/level/Level(819): pocketmine\level\Level->processChunkRequest()
    [13:02:02] [Server thread/DEBUG]: #8 src/pocketmine/Server(2395): pocketmine\level\Level->doTick(integer 20740)
    [13:02:02] [Server thread/DEBUG]: #9 src/pocketmine/Server(2552): pocketmine\Server->checkTickUpdates(integer 20740, double 1519477322.2195)
    [13:02:02] [Server thread/DEBUG]: #10 src/pocketmine/Server(2291): pocketmine\Server->tick()
    [13:02:02] [Server thread/DEBUG]: #11 src/pocketmine/Server(2164): pocketmine\Server->tickProcessor()
    [13:02:02] [Server thread/DEBUG]: #12 src/pocketmine/Server(1747): pocketmine\Server->start()
    [13:02:02] [Server thread/DEBUG]: #13 src/pocketmine/PocketMine(385): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /snowix-1.2/, string /snowix-1.2/plugins/)
    [13:02:02] [Server thread/DEBUG]: #14 /snowix-1.2/PocketMine-MP.phar(1): require(string phar:///snowix-1.2/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
    [13:02:02] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerJoinEvent' to 'SnowixAPI v1.1': Class 'pocketmine\scheduler\CallbackTask' not found on plugin\main
    [13:02:02] [Server thread/CRITICAL]: Error: "Class 'pocketmine\scheduler\CallbackTask' not found" (EXCEPTION) in "SnowixAPI/src/plugin/main" at line 146
    [13:02:02] [Server thread/DEBUG]: #0 src/pocketmine/plugin/MethodEventExecutor(38): plugin\main->onPlayerJoinEvent(pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(plugin\main object, pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #2 src/pocketmine/plugin/PluginManager(687): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #3 src/pocketmine/Player(966): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\player\PlayerJoinEvent object)
    [13:02:02] [Server thread/DEBUG]: #4 src/pocketmine/Player(914): pocketmine\Player->doFirstSpawn()
    [13:02:02] [Server thread/DEBUG]: #5 src/pocketmine/level/Level(2552): pocketmine\Player->sendChunk(integer 8, integer 11, pocketmine\network\mcpe\protocol\BatchPacket object)
    [13:02:02] [Server thread/DEBUG]: #6 src/pocketmine/level/Level(2571): pocketmine\level\Level->sendChunkFromCache(integer 8, integer 11)
    [13:02:02] [Server thread/DEBUG]: #7 src/pocketmine/level/Level(819): pocketmine\level\Level->processChunkRequest()
    [13:02:02] [Server thread/DEBUG]: #8 src/pocketmine/Server(2395): pocketmine\level\Level->doTick(integer 20740)
    [13:02:02] [Server thread/DEBUG]: #9 src/pocketmine/Server(2552): pocketmine\Server->checkTickUpdates(integer 20740, double 1519477322.2195)
    [13:02:02] [Server thread/DEBUG]: #10 src/pocketmine/Server(2291): pocketmine\Server->tick()
    [13:02:02] [Server thread/DEBUG]: #11 src/pocketmine/Server(2164): pocketmine\Server->tickProcessor()
    [13:02:02] [Server thread/DEBUG]: #12 src/pocketmine/Server(1747): pocketmine\Server->start()
    [13:02:02] [Server thread/DEBUG]: #13 src/pocketmine/PocketMine(385): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /snowix-1.2/, string /snowix-1.2/plugins/)
    [13:02:02] [Server thread/DEBUG]: #14 /snowix-1.2/PocketMine-MP.phar(1): require(string phar:///snowix-1.2/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
     
  2. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    Recently, the Enchantment API was changed. Enchantment::setLevel() was moved to EnchantmentInstance::setLevel().

    The new method is to use Item::addEnchantment() with an EnchantmentInstance.
    PHP:
    $item->addEnchantment(new EnchantmentInstance($enchant$level));
     
    OnTheVerge likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.