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

I want anvil and echant to work but it doesn't work

Discussion in 'Plugin Help' started by FanTSM, Apr 16, 2022.

  1. FanTSM

    FanTSM Spider Jockey

    Messages:
    28
    GitHub:
    nam2k
    public function onEnable(): void {
    BlockFactory::registerBlock(new Anvil(), true);
    BlockFactory::registerBlock(new EnchantmentBlock(), true);

    $this->getServer()->getPluginManager()->registerEvents(new EventListener(), $this);
    }

    }
     
  2. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Just registering the block itself won't make the whole thing function.
    You'll need to implement the vanilla features that aren't implemented in PocketMine yourself
     
  3. FanTSM

    FanTSM Spider Jockey

    Messages:
    28
    GitHub:
    nam2k
    I'm using the vanillaX console plugin and it gives me an error in this line of code I don't understand
     
  4. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Send the error then
     
  5. FanTSM

    FanTSM Spider Jockey

    Messages:
    28
    GitHub:
    nam2k
    [22:35:44.484] [Server thread/INFO]: Enabling VanillaInventory v1.1.2
    [22:35:44.485] [Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\block\BlockFactory::registerBlock()" (EXCEPTION) in "plugins/VanillaInventory-main/src/korado531m7/VanillaInventory/Main" at line 22
    --- Stack trace ---
    #0 pmsrc/src/plugin/PluginBase(137): korado531m7\VanillaInventory\Main->onEnable()
    #1 pmsrc/src/plugin/PluginManager(437): pocketmine\plugin\PluginBase->onEnableStateChange(true)
    #2 pmsrc/src/Server(1385): pocketmine\plugin\PluginManager->enablePlugin(object korado531m7\VanillaInventory\Main#25216)
    #3 pmsrc/src/Server(1011): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#24900)
    #4 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[46] C:\Users\thgna\OneDrive\M..y t..nh\pocketmine\, string[54] C:\Users\thgna\OneDrive\M..y t..nh\pocketmine\plugins\)
    #5 pmsrc/src/PocketMine(327): pocketmine\server()
    #6 pmsrc(11): require(string[90] phar://C:/Users/thgna/OneDrive/M..y t..nh/pocketmine/PocketMine-MP.phar/src/Pock)
    --- End of exception information ---
    [22:35:44.485] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
    [22:35:44.491] [Server thread/EMERGENCY]: Please upload the "C:/Users/thgna/OneDrive/Máy tính/pocketmine/crashdumps/Sat_Apr_16-22.35.44-WIB_2022.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
     
  6. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Ask the author of ur plugin to fix it
     
  7. FanTSM

    FanTSM Spider Jockey

    Messages:
    28
    GitHub:
    nam2k
    I have fixed it, thanks. currently my new problem a lot of plugins encountered
    [Server thread/ERROR]: Could not load plugin 'C:\Users\thgna\Desktop\PocketMine-MP-stable\plugins\ITEM-ID-main': Invalid plugin manifest: Command id does not have a valid permission set
     
  8. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Send plugin.yml
     
  9. FanTSM

    FanTSM Spider Jockey

    Messages:
    28
    GitHub:
    nam2k
    Code:
    ---
    name: ItemID
    version: 1.0.0
    author: HasiyfGaming
    website: https://github.com/DerphSZ
    description: ItemID Plugin for PocketMine Server 1.16 - 1.17 Version
    main: hasiyfgaming\itemid\Main
    api: 4.0.0
    
    commands:
        id:
          description: "ItemID commands"
          default: true
    ...
    
     
  10. GamingFR91

    GamingFR91 Spider Jockey

    Messages:
    29
    GitHub:
    kanekilechomeur
    Try this one
    Code:
    ---
    name: ItemID
    version: 1.0.0
    author: HasiyfGaming
    website: https://github.com/DerphSZ
    description: ItemID Plugin for PocketMine Server 1.16 - 1.17 Version
    main: hasiyfgaming\itemid\Main
    api: 4.0.0
    
    commands:
      id:
        description: "ItemID commands"
        default: true
        permission: id.cmd
    
    permissions:
      id.cmd
        default: true
    ...
    
     
  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.