Solved Adding amount to gui

Discussion in 'Plugin Development' started by johnnyD, Jul 11, 2020.

  1. Offline

    johnnyD

  2. Offline

    CraftCreeper6

    @johnnyD
    You haven't posted any code, but I can guess that each time you open the inventory you are adding the items again. Just add them once in an initialize method in onEnable and you won't have to add them again.
     
  3. Offline

    johnnyD

  4. Offline

    KarimAKL

    @johnnyD Create a new inventory for the player. You can't share 1 inventory when every player should see something different.

    Bukkit#getPlayer(...) & Bukkit#getOnlinePlayers() should work for that. :p
     
  5. Offline

    johnnyD

    Ended up just making a method to create the inv lol. Idk why I didnt think of that before. Thanks for the suggestions tho!
     

Share This Page