📜  spigot 造成伤害 - Java 代码示例

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

代码示例1
player.damage(damageToDeal);

// For dealing damage to entity convert it to Damageable
if (entity instanceof Damageable) {
    ((Damageable) entity).damage(damageToDeal);
}