Acrobat.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:AnnihilationPro 作者:
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void AcrobatDoubleJump(PlayerToggleFlightEvent event) 
{  
    Player player = event.getPlayer();
    if(player.getGameMode() != GameMode.CREATIVE) 
    {
        AnniPlayer p = AnniPlayer.getPlayer(player.getUniqueId());
        if(Game.isGameRunning() && p != null && p.getKit().equals(this))
        {
            Delays.getInstance().addDelay(player, System.currentTimeMillis()+10000, this.getInternalName());
            event.setCancelled(true);
            player.setAllowFlight(false);
            player.setFlying(false);            
            player.setVelocity(player.getLocation().getDirection().setY(1).multiply(1));
            player.playSound(player.getLocation(), Sound.ZOMBIE_INFECT, 1.0F, 2.0F);
        }
        else
        {
            player.setAllowFlight(false);
            player.setFlying(false);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号