How to Open Double Chest on Command

Discussion in 'Development' started by SpotifyHDz, Jan 11, 2018.

  1. SpotifyHDz

    SpotifyHDz Creeper

    Messages:
    1
    Hello PMMP Devs. I'm a new starter dev and I'm trying to figure out to open a double chest on command and save the items inside of the chest if i run the command again. I need your help. Please help me
     
    OnTheVerge likes this.
  2. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    Please use searchbar
     
  3. FlatterGnat9702

    FlatterGnat9702 Spider

    Messages:
    14
    GitHub:
    FlatterGnat9702
  4. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    687
    GitHub:
    xXNiceYT
    Same I am old dev trying find same thing xD
     
  5. Oniii-Chan

    Oniii-Chan Witch

    Messages:
    65
    GitHub:
    Vincent583
    You can check this plugin https://github.com/Muqsit/PlayerVaults to to get idea and create your your own.
     
  6. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    687
    GitHub:
    xXNiceYT
  7. Oniii-Chan

    Oniii-Chan Witch

    Messages:
    65
    GitHub:
    Vincent583
    Yes but you can write your own to get double chest
     
  8. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    687
    GitHub:
    xXNiceYT
    Well it same code any way xD
     
  9. Oniii-Chan

    Oniii-Chan Witch

    Messages:
    65
    GitHub:
    Vincent583
    xD
     
  10. Oniii-Chan

    Oniii-Chan Witch

    Messages:
    65
    GitHub:
    Vincent583
  11. Muqsit

    Muqsit Chicken Verified

    Messages:
    1,517
    GitHub:
    muqsit
    Double chests are complicated.
    You'll need to add at max a 0.25s delay AFTER sending the player the blocks and tiles. This delay can be shortened depending on the player's ping (Player::getPing()). After this delay you can send the player the inventory.
    Code:
    Send blocks to player
    Send tiles with pairx and pairz NBT tags
    scheduleDelayedTask(0.25s){
        player->sendInventory();
    }
    
     
    Oniii-Chan and OnTheVerge like this.
  12. Muqsit

    Muqsit Chicken Verified

    Messages:
    1,517
    GitHub:
    muqsit

Share This Page

  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.