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

automatic refilling chests with items for hungergames

Comments in 'Plugin Development' started by jerlegoman, Mar 3, 2014.

  1. jerlegoman
    Offline

    jerlegoman Active Member

    Joined:
    Dec 10, 2013
    Posts:
    120
    Minecraft User:
    jeremy647
    Hi my name is jerlegoman can anyone help me set up a automatic refilling chest plugin. all I know about the chest api is you have to add it as a tile almost like a sign I guess.
    thanks,
    from, jerlegoman
  2. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    754
    Plugins:
    2
    Minecraft User:
    Darunia18
    Hello. I've been working with chests for the last two months or so and I plan to get around to this really soon, but school has gotten in the way of many of my projects :/
    Andrey Nazarchuk likes this.
  3. jerlegoman
    Offline

    jerlegoman Active Member

    Joined:
    Dec 10, 2013
    Posts:
    120
    Minecraft User:
    jeremy647
    yeah school also gets in my way too sometimes
    Darunia18 likes this.
  4. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Get the chest object and do $chest->setSlot(Slot_Integer, ItemObject)
    Darunia18 likes this.
  5. THE6walcybba
    Offline

    THE6walcybba New Member

    Joined:
    May 3, 2014
    Posts:
    5
    Minecraft User:
    6walcybba
  6. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    Anyone got this for new current api?
  7. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    754
    Plugins:
    2
    Minecraft User:
    Darunia18
    Andrey Nazarchuk likes this.
  8. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    That's for 1.4 :'(
  9. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    754
    Plugins:
    2
    Minecraft User:
    Darunia18
    It's compatible with any version of PocketMine running API 1.x. This plugin works with PocketMine 1.4, 1.5, and 1.6, but it will not work with the PHP7 version of 1.6. Be careful when downloading PocketMine Bleeding phars on the Jenkins server. Be sure to download the ones that are NOT labelled PHP7 or else you won't be able to do anything.
    Andrey Nazarchuk likes this.
  10. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    Thanks :D
    Is there an page anywhere saying what we should do to our plugins to prepare them for php7?
    also:
    PHP:
    foreach($level->getTiles() as $t){
    if(
    $t instanceof Chest){
    $this->doStuff;
    }
    }
    Would that work to get all chests in a level instead of just /refill ones?
    Please pretend $level points to a valid level.
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No, because the new API is not completed yet.
    Please note that PHP 7 doesn't break the plugins. It is the PocketMine update that adapts new features in PHP 7 that break backwards compatibility.

    I believe @shoghicp or @Intyre will write something about the API changes. If they don't, or if they don't write a readable one, I'll write one :p

Share This Page

Advertisement