Solved IF isn't working properly

Discussion in 'Spigot Plugin Development' started by BumseBine, Jul 13, 2018.

  1. Hello,
    I'm trying to do a check if a player has a specific item in his inventory. My if case isn't working
    Code (Java):
    if(p.getInventory().contains(new ItemStack(Material.CLAY_BRICK, 2))) {
    I'm getting no errors and everything else is working. Just this if case skips to the else statements.
  2. MiniDigger


    If you want to check the amount, use this method
  3. Thank you very much