AntiDamageSkull.java 文件源码

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

项目:NeverLag 作者:
@EventHandler
public void onDamageSkull(PlayerInteractEvent e) {
    if (cm.isAntiDamageSkull) {
        if (Action.RIGHT_CLICK_BLOCK == e.getAction()) {
            if (e.getItem() != null) {
                Material type = e.getItem().getType();
                if (Material.LAVA_BUCKET == type || Material.WATER_BUCKET == type) {
                    fixSkull(e.getClickedBlock().getRelative(BlockFace.UP));
                } else if (Material.ANVIL == type) {
                    for (BlockFace face : BLOCKFACE) {
                        fixSkull(e.getClickedBlock().getRelative(face));
                    }
                }
            }
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号