Solved checking a skull

Discussion in 'Plugin Development' started by mmuziek, Apr 16, 2016.

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

    mmuziek

    hi there
    i have a problem and here is my code :
    http://pastebin.com/AkrQ19W1

    the skull check isnt working it always returns false and doenst continue my code.

    after debugging i find that everything is the same can someone see what im doing wrong here?
    ps. the script that created the skull is the same as the skullair thats in the provided code
     
  2. Offline

    Assist

    @mmuziek
    Could you show us the "inventoryContainsItem" method?
     
  3. Offline

    mmuziek

  4. Offline

    Zombie_Striker

    Code:
       if (item.getTypeId() == id && item.getDurability() == data && item.getItemMeta().getDisplayName().toString() == name && item.getItemMeta().getLore() == lore) {

    Edit: Strings cannot be compared using "==", nor can Lores. You MUST use .equals to compare values.
     
  5. Offline

    mmuziek

    that solved it thanks man you solved a problem i had for weeks!
     
Thread Status:
Not open for further replies.

Share This Page