/** * Prevents a player that can't interact from picking up experience. * * @param event The event. */ @EventHandler(ignoreCancelled = true) public void onPlayerPickupExperience(PlayerPickupExperienceEvent event) { if (!canInteract(event.getPlayer())) { event.setCancelled(true); } }
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerPickupExperience(PlayerPickupExperienceEvent event) { if (this.isObserving(event.getPlayer())) { event.setCancelled(true); } }
@EventHandler public void onPlayerPickupExperience(PlayerPickupExperienceEvent event) { if (testObserverOrDead(event.getPlayer())) { event.setCancelled(true); } }