poura vei
Adiciona akeles métodos...
@SuppressWarnings("deprecation")
@EventHandler
public void minerar(BlockBreakEvent e) {
Block bloco = e.getBlock();
Player p = e.getPlayer();
if (p.getItemInHand().getType() == Material.WOOD_PICKAXE || p.getItemInHand().getType() == Material.STONE_PICKAXE || p.getItemInHand().getType() == Material.IRON_PICKAXE || p.getItemInHand().getType() == Material.GOLD_PICKAXE || p.getItemInHand().getType() == Material.DIAMOND_PICKAXE) {
if (p.getItemInHand().getItemMeta().getEnchants().get(Enchantment.SILK_TOUCH) != null) {
if (!canBreak(bloco.getLocation(), p, p.getItemInHand().getType())) {
// voce n pode kebra essa budega;...
return;
}
if (bloco.getType().getId() == 52) {
p.getInventory().addItem(new ItemStack(Material.MOB_SPAWNER));
}
}
}
}