diff options
author | Sansko1337 <sansko1337@users.noreply.github.com> | 2016-03-25 00:33:15 +0100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-27 10:10:09 +1100 |
commit | 67b9a6f66b74a8df1977067ef2bbf45274da1bdf (patch) | |
tree | 4f937efe40c916ca12249031d2df5e3ccff9cc6b /src/main | |
parent | 0052c3c5a767adde7a333bdda46629971bc3edb9 (diff) | |
download | bukkit-67b9a6f66b74a8df1977067ef2bbf45274da1bdf.tar bukkit-67b9a6f66b74a8df1977067ef2bbf45274da1bdf.tar.gz bukkit-67b9a6f66b74a8df1977067ef2bbf45274da1bdf.tar.lz bukkit-67b9a6f66b74a8df1977067ef2bbf45274da1bdf.tar.xz bukkit-67b9a6f66b74a8df1977067ef2bbf45274da1bdf.zip |
Implement getting / setting of Entity invulnerability.
Diffstat (limited to 'src/main')
-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(); } |