diff options
-rw-r--r-- | src/main/java/org/bukkit/entity/Entity.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java index 6dc70768..bba33b95 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -356,4 +356,21 @@ public interface Entity extends Metadatable, CommandSender { * @return whether the entity is glowing */ boolean isGlowing(); + + /** + * Sets whether the entity is invulnerable or not. + * <p> + * When an entity is invulnerable it can only be damaged by players in + * creative mode. + * + * @param flag if the entity is invulnerable + */ + public void setInvulnerable(boolean flag); + + /** + * Gets whether the entity is invulnerable or not. + * + * @return whether the entity is + */ + public boolean isInvulnerable(); } |