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

Chest window shop

Discussion in 'Requests' started by Daniktheboss, Nov 16, 2016.

  1. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    to return to main topic of OP question,
    i think just use some hacks or on interact sign
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    You can't make a plugin force close the chat window.
     
    applqpak likes this.
  3. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    I read on a different post that damaging the player would close the chat window. So could you not force something like that before you send the GUI packets?
     
  4. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Yep, I said that (in another thread I think), when the player gets damage, the chat windows closes. So you could damage the player to close the chat, give him/her the health back again and then send the chest-inventory when. But this is very, very hacky, I hope there is a better way
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    that was a bug that was fixed in 1.0, I don't think it works anymore
     
    applqpak and Muqsit like this.
  6. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    That was a bug? :eek:
     
    applqpak and jasonwynn10 like this.
  7. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    I didn't know that either.
     
  8. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    Rip, my bad.
     
    applqpak and jasonwynn10 like this.
  9. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Yes but i need to know how to put items in a chest and doing a certain command when they item is being taken out. :/
     
  10. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    InventoryTransactionEvent can be used to trigger this
     
  11. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    I'd make one but there would be conflicts of InventoryTransactionEvent between pmmp and the gfork and I'd thus be forced to make two versions which would be a pain.
    I'll just make the pmmp version of this for now. If anyone wants to contribute, check my GitHub.
     
    jasonwynn10 and applqpak like this.
  12. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    I am working on it here
     
  13. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    ChestShop
    A simple ChestGUI based Shop Plugin
    Chest shop allows you to create Chest GUI based shops - a widely used feature in minigames such as MoneyWars, SkyBlock and SkyWars.

    Features:

    • Ability to add enchanted, custom named, custom NBT tagged items.
    • Everything can be managed in-game on run time. No config modification needed.
    • Two papers, named "Turn Left" and "Turn Right" are located at the end of the GUI to switch pages.
    • ChestGUI (Block and inventory) is only sent to the command issuer. The GUI tile block is unbreakable, making it impossible for anyone to duplicate the chest contents.
    • Usage of custom chest tiles and inventories rather than bulk events for performance.
    Commands:
    • /cs - Opens the ChestShop. (Permission: Everyone)
    • /cs add [price] - Add the item in your hand to the ChestShop. (Permission: OP)
    • /cs remove [page] [slot] - Remove item from a specific page and slot. (Permission: OP)
    • /cs reload - Reloads the plugin (use this if you experience issues).
    • /cs help - List all commands with their descriptions.
    Thats it. There's one small error with unserialization of NBT tags. Basically, after you are done with /cs add [price], and you test-check the items by doing /cs, you will get "An unknown error occurred" message. To fix this, either restart the server or use /cs reload.
    View this on GitHub.
     

    Attached Files:

    Last edited: Jan 26, 2017
  14. jerryzooyoyo

    jerryzooyoyo Silverfish

    Messages:
    19
    GitHub:
    jerryzooyoyo
    thread:CRITICAL > "無法處理事件 'pocketmine\event\inventory\InventoryTransactionEvent' 至 'ChestShop v1.0.0':Call to a member function getValue() on null 在 ChestShop\EventListener 上"
    thread:CRITICAL > Error: "Call to a member function getValue() on null" (EXCEPTION) in "/plugins/ChestShop/src/ChestShop/EventListener" at line 85
     
  15. jerryzooyoyo

    jerryzooyoyo Silverfish

    Messages:
    19
    GitHub:
    jerryzooyoyo
    That's so bad...:(
     
  16. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    what if they got bored because they will have to keep on browsing the item they wanna buy :/
     
  17. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    That's their personal problem.

    Fixed.
     
  18. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    Not really, they will get bored out and eventually quit playing the server, tiles are boring
     
  19. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    That's still their personal problem. Players on my server really love the GUI interactions. And my server is mostly based on GUIs.
     
    jasonwynn10 likes this.
  20. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    Not really, and ikr thatswhy i said boring
     
  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.