Solved Change inventory size without creating a new inventory

Discussion in 'Plugin Development' started by Max8801, Sep 16, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hey guys,
    I wonder if it would be possible to change the size of a custom inventory while a player is looking at it. The problem with creating a new one and opening it for the player is, that the mouse cursor get's moved to the center of the screen.

    Can anyone help?

    Regards, Max
  2. Offline


    Hey! maybe this could help you:
  3. Offline


    Nope. You cannot change an inventory while it is being viewed. You can, however, "block off" slots so that the player cannot access them. After that, change those individual slots if you want to expand the inventory.
  4. Offline


    But how does manage to do it? Just use /shop and try yourself

    Thanks, but I know how to create a virtual inventory :D
    My question is how I can change the size of the inventory after the inventory object was created. As mentioned above, the server SoulPvP managed to do that
  5. Offline


    They open another inventory?
    Zombie_Striker likes this.
  6. Offline


    Wow. Thanks. I'm feeling so dumb now. I cant remember why and when but I added player.closeInventory() before I opened the new one. Of course that centers the cursor. Thank you all for your Replys. I apalogize for my dumbness :D
Thread Status:
Not open for further replies.

Share This Page