Add an isValid() method to Entity. Addresses BUKKIT-810

By: TomyLobo <tomylobo@nurfuerspam.de>
This commit is contained in:
Bukkit/Spigot 2011-11-25 02:09:30 +01:00
parent d4f4e9f5d1
commit a767f3fed8
2 changed files with 11 additions and 0 deletions

View file

@ -129,6 +129,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
*

View file

@ -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.");
}
}