From ea49b2eee9f6b3069d992e38a255789395580db3 Mon Sep 17 00:00:00 2001 From: Sansko1337 Date: Fri, 25 Mar 2016 00:45:24 +0100 Subject: [PATCH] Implement getting / setting of Entity invulnerability --- .../org/bukkit/craftbukkit/entity/CraftEntity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 5572ac1d3c..83f91313d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -553,6 +553,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return getHandle().glowing; } + @Override + public void setInvulnerable(boolean flag) { + getHandle().h(flag); // PAIL: rename setInvulnerable + } + + @Override + public boolean isInvulnerable() { + return getHandle().isInvulnerable(DamageSource.GENERIC); + } + private static PermissibleBase getPermissibleBase() { if (perm == null) { perm = new PermissibleBase(new ServerOperator() {