chest GUI help (show things per player)

Discussion in 'Plugin Development' started by Hendrik_the_best, May 6, 2014.

Thread Status:
Not open for further replies.
  1. I am making a plugin with a chest GUI and one of the item names is the name from the player,
    but when someone els opens the chest GUI it shows there name for everyone that is looking in the GUI.
    What is the best way to make it work per player?
    I hope you understend me,
    Thanks -Hendrik. :)
     
  2. Offline

    minoneer

    The easyest Way would be to create a new Inventory for each Player with the same Contents.
     
  3. minoneer
    could you tell me how i could make one for every player?
     
  4. Offline

    minoneer

    You can create an inventory using one of the Server.createInventory() methods. To show it to the player, use Player.openInventory()
     
  5. Offline

    gamingod

    Another thing you could do instead of multiple inventories is set the items per player
    For example:
    when I open the GUI it sets the first item to stone
    when you open the GUI it sets the first item to dirt
     
  6. Offline

    Gater12

    gamingod
    But they all share the same one inventory. It's better off to have separate inventory objects for each player.
     
Thread Status:
Not open for further replies.

Share This Page