diff options
-rw-r--r-- | src/main/java/org/bukkit/entity/Entity.java | 7 | ||||
-rw-r--r-- | src/test/java/org/bukkit/plugin/messaging/TestPlayer.java | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java index 4f75e270..9058429b 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -130,6 +130,13 @@ public interface Entity extends Metadatable { public boolean isDead(); /** + * Returns false if the entity has died or been despawned for some other + * reason. + * @return True if valid. + */ + public boolean isValid(); + + /** * Gets the {@link Server} that contains this Entity * * @return Server instance running this Entity diff --git a/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java b/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java index 15e60c14..061a5e06 100644 --- a/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java +++ b/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java @@ -760,4 +760,8 @@ public class TestPlayer implements Player { public boolean hasLineOfSight(Entity other) { throw new UnsupportedOperationException("Not supported yet."); } + + public boolean isValid() { + throw new UnsupportedOperationException("Not supported yet."); + } } |