📜  spigot 禁用健康再生 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:33.359000             🧑  作者: Mango

代码示例1
@EventHandler
    public void onPlayerRegainHealth(EntityRegainHealthEvent event) {
        if(event.getRegainReason() == RegainReason.SATIATED || event.getRegainReason() == RegainReason.REGEN)
            event.setCancelled(true);
    }