Java 类org.bukkit.event.entity.HorseJumpEvent 实例源码

项目:Equestrian-Dash    文件:HorseJumpListener.java   
@EventHandler
public void onJump(HorseJumpEvent event)
{
    Player p = (Player) event.getEntity().getPassenger();
    if (plugin.getGameHandler().getGameState() != GameHandler.GameState.RACE_IN_PROGRESS || racetrackNearby(event.getEntity()))
    {
        event.setCancelled(true);
    }

    if (p.hasMetadata("superCharged") && p.getMetadata("superCharged").get(0).asBoolean())
    {
        event.setPower(event.getPower() * 3);
    }
    //p.sendMessage(EquestrianDash.Prefix + "Power is: §4" + event.getPower());

}