ItemStack CanPlaceOn & CanBreak Tag

Discussion in 'Spigot Plugin Development' started by UnemployedNinja, May 17, 2017.

  1. Hey, I was just wondering if anyone knows how to get/set the item tags for what an item can break, and/or what it can be placed on. I can get other other bits of data for the item from the ItemStack, but I just can't seem to find this one. Any help would be greatly appreciated, thanks.
     
  2. Choco

    Moderator

    I don't actually think there's an API for this unless it's in some class other than ItemStack / ItemMeta. You may have to resort to NBT tags. Not sure why this isn't implemented.
     
    • Agree Agree x 1
  3. NathanWolf

    Supporter

    I'm guessing maybe the ugliness of converting to/from Bukkit Materials and minecraft block names for the tags... but yeah maybe somebody should work on a PR ;)
     
    • Agree Agree x 1