Java 类org.bukkit.event.player.PlayerPickupExperienceEvent 实例源码

项目:Cardinal    文件:InteractModule.java   
/**
 * 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);
  }
}
项目:Arcade2    文件:ObserverListeners.java   
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerPickupExperience(PlayerPickupExperienceEvent event) {
    if (this.isObserving(event.getPlayer())) {
        event.setCancelled(true);
    }
}
项目:CardinalPGM    文件:ObserverModule.java   
@EventHandler
public void onPlayerPickupExperience(PlayerPickupExperienceEvent event) {
    if (testObserverOrDead(event.getPlayer())) {
        event.setCancelled(true);
    }
}