From a21f038fc335c6d9e77290e613937c234d0a15a1 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Mon, 25 Jun 2012 03:24:53 -0500 Subject: Mark entities as invalid when they get despawned. Addresses BUKKIT-810 --- src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index a6d9c377..9ab1e669 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -212,6 +212,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return !entity.isAlive(); } + public boolean isValid() { + return entity.isAlive() && entity.valid; + } + public Server getServer() { return server; } -- cgit v1.2.3