- Баллы
- 76
- Имя в Minecraft
- AguRChek_TV
короче мне нужно отнимать прочность у айтема
Код:
@EventHandler
public void Slots(PlayerInteractEvent e) {
Player p = e.getPlayer();
ItemStack item = p.getItemInHand();
if ((e.getAction() == Action.RIGHT_CLICK_AIR)) {
if (item.getType() == Material.FLINT_AND_STEEL) {
Location loc2 = new Location(p.getWorld(), loc.getX(), loc.getY() + 1.25, loc.getZ());
SmallFireball fire = (SmallFireball) p.getWorld().spawnEntity(loc2.setDirection(p.getLocation().getDirection()), EntityType.SMALL_FIREBALL);
e.setCancelled(true);
}
}
}