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

Chests

Comments in 'Plugin Development' started by JackboyPlay, Apr 24, 2016.

  1. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Hello how can I fill chests between 2 Positions with stuff?
    [2 Positions = Quadrat]
  2. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    You have to use the Chest Till to locate the chest using Vector3.
    PHP:
    $level $this->getServer()->getLevelByName("world");
    $level->getTile(new Vector3($x,$y,$z))->getInventory()->addItem(Item::get(ID00))

    By the way, Quadrat is still German :p
    Last edited: Apr 24, 2016
  3. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Thats not the answer on my question I meant that I can fill all chests in a area
  4. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    That's not possible, but when, to much math for a sunday
  5. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Of course is it possible
  6. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    You have to check if Level::getTile() returns is valid to make further method calls on it.
  7. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    That isnt the answer to my question I meant that I can select 2 Coordinates in my plugin between the 2 Coordinates I get all chests and fill them with stuff

Share This Page

Advertisement