Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The removal of the subject from the creative

Comments in 'Plugin Development' started by pub4game, Sep 1, 2015.

  1. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    Can I remove the unit from the menu of creative? For example a bucket of lava
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    you can edit it in pocketmine source code :D but using plugin too
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    PHP:
    Item::removeCreativeItem(Item $item)
    or
    PHP:
    Item::addCreativeItem(Item $item)
  4. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    Could you do me an example? Please remove the diamond block ID 57
  5. DunxandMinecraft
    Offline

    DunxandMinecraft Active Member

    Joined:
    Oct 26, 2014
    Posts:
    158
    So if you were doing that then would this be correct practise.
    PHP:
    Item::removeCreativeItem(Item $57)
  6. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    Yaa But what event do we use for the function???
    is it pocketmine\inventory\inventory
  7. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    Nope, it's pocketmine\item\Item :p
  8. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    Thanks

    and the function name? Eg. onJoin
  9. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    onEnable :p
  10. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    ....
    But okk

    Thanks
  11. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
  12. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    Parse error: syntax error, unexpected '$item' (T_VARIABLE) on line 58
    $item = 57;
    Item::clearCreativeItems (Item $item);

    What's wrong?
  13. basprohop
    Offline

    basprohop Active Member Plugin Developer

    Joined:
    Aug 8, 2015
    Posts:
    128
    Plugins:
    3
    Minecraft User:
    basprohop
    This isn't Java.
    o.o
  14. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Item::addCreativeItem(Item::get(57))
    pub4game likes this.
  15. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    You mean removeCreativeItem? :p
  16. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    It's Item::removeCreativeItem(). Please make sure you understand what they are asking for before providing a solution.
  17. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  18. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    He only asked how to remove an item/unit. :p
    Taha_The_Hacker and MCPEPIG like this.
  19. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    i think he is not stupid and if so, it is not my problem :p
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Whoever understands what is going on, even without having to know PocketMine API, knows what's happening. Can you just be a bit less serious?

Share This Page

Advertisement