Solved Checking if the inventory equals to player's inventory

Discussion in 'Plugin Development' started by NickDEV, Sep 24, 2015.

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

    NickDEV

    How can I check if the inventory equals to player's inventory? (Not just the player that executed the command or triggered an event but any player on the server.)

    Code:
            for(Player all : Bukkit.getOnlinePlayers())
                  if(e.getInventory() == all.getInventory())
                    //woop)
    Found the solution.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  2. Use .equals instead of ==
     
Thread Status:
Not open for further replies.

Share This Page