Solved Creating a unique itemstack

Discussion in 'Plugin Development' started by libraryaddict, Apr 18, 2013.

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

    libraryaddict

    So my problem is that I need to create a unique itemstack.

    So that the itemstack which appears to the player as the exact same as this itemstack. Is not in fact the exact same.

    So itemstack.equals(otherItemStack) returns false.

    The only idea I had was adding lore with a unique identifier. Which would still be visible to the player..
     
  2. Do you need to store hidden data on the item ? Because you can just give it an unique display name and you're done.

    However, you could also use the display name to add hidden strings by prefixing each character with ChatColor.COLOR_CHAR, that would make each character be assumed as a color character and would be hidden... and to retrieve the string just remove all ChatColor.COLOR_CHAR characters from the string and remove the prefixing item name and you have your hidden data back.
     
    libraryaddict likes this.
  3. Offline

    libraryaddict

    This sounds like what I'm looking for. Now to create a method where it internally keeps storage..
     
  4. libraryaddict likes this.
  5. Offline

    libraryaddict

    Digi likes this.
Thread Status:
Not open for further replies.

Share This Page