spigot item break code example
Example 1: spigot item break
ItemStack defaultBow = new ItemStack(Material.BOW);
defaultBow.getItemMeta().setUnbreakable(true);
Example 2: spigot item break
@EventHandler
public void ItemBreak(PlayerItemBreakEvent e){
e.getPlayer().getInventory().addItem(e.getBrokenItem());
}