Item's unique id, different for each item in the game

Discussion in 'Spigot Plugin Development' started by Flockshot, Jun 8, 2016.

  1. Hey guys, so i wanted to know that is there a way to give or get a unique id of an item?
    That is totally different from any of its materiel type item or any other type in the game.
    So basicaly i am trying to make a upgrade pickaxe plugin, where i need to keep track of pickaxe current type of upgrade and its tier lvl, (its upgrade lvl). Is there a way i can do so? so every pickaxe can has its own lvl and different build actually.
    I wanna keep track of it so i can actually know what lvl and upgrade the pickaxe currently have when i need to further upgrade it.

    For reference lets take 2 players;
    Player 1 have 1 pickaxe with enchantment efficiency 2
    Player 2 have 1 pickaxe with enchantment efficiency 5

    Both players upgrade their pickaxe with efficiency tier 1 which basicaly plus 1 the efficiency lvl
    so

    Player 1 will now have efficiency 3 pickaxe
    Player 2 will now have efficiency 6 pickaxe
    and both will now have Effieciency Tier 1 marked as done..
    So i want to mark the pickaxe that this tier is done, and when its upgraded again it should choose tier 2 of efficiency
     
  2. Use lore as an unique id.
     
  3. If you want to assign a unique id to an item, can't you use UUID.randomUUID() and assign those randomly created UUIDs to your items?
     
  4. assign it by? lores?
     
  5. This might still work.