mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-09-18 21:54:50 +00:00
#375: Add accessors to Wither's invulnerability ticks
This commit is contained in:
parent
bfd8b1ac82
commit
63cad7f840
1 changed files with 12 additions and 0 deletions
|
@ -61,4 +61,16 @@ public class CraftWither extends CraftMonster implements Wither {
|
|||
Entity target = getHandle().getLevel().getEntity(entityId);
|
||||
return (target != null) ? (LivingEntity) target.getBukkitEntity() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInvulnerabilityTicks() {
|
||||
return getHandle().getInvulnerableTicks();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInvulnerabilityTicks(int ticks) {
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks must be >=0");
|
||||
|
||||
getHandle().setInvulnerableTicks(ticks);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue