So i got this code: Code (Text): @EventHandler public void onInteract(PlayerInteractEntityEvent e) { if(e.getRightClicked().getType() == EntityType.ENDER_CRYSTAL) { if(points.getInt("points." + e.getPlayer().getUniqueId()) == 0) { e.getPlayer().sendMessage(Crates + "§5You got no points!"); }else if(points.getInt("points." + e.getPlayer().getUniqueId()) > 0) { playCrateEffects(e.getPlayer()); int kills = points.getInt("points." + e.getPlayer().getUniqueId()); points.set("points." + e.getPlayer().getUniqueId(), Integer.valueOf(kills - 1)); e.getPlayer().sendMessage("§7T"); try { points.save(file); } catch (IOException e1) { e1.printStackTrace(); } } } } And everytime i click the ender crystal, it sends the "T" message twice. I know it's the 1.9 update, two hands. But i found nothing that really helped. Thanks.
Because sometime the event is fired twice, once every hand. Maybe you can do a short cooldown using a Set<Player> and a bukkitRunnable
Use e.getHand() to determine which one is right clicking. There's this thing called Google that gives answers to those who look. Code (Text): if ( !e.getHand().equals( EquipmentSlot.HAND ) ) return; That returns if they player isn't using their main hand.