summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2012-06-25 03:24:53 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-06-28 19:34:31 -0500
commita21f038fc335c6d9e77290e613937c234d0a15a1 (patch)
tree5dcf78884230e56f9a9d4f28bd7138d0365d9176 /src/main/java/org
parentf5b6abfae1377905e6fc2c46e36dfe2279c48b2b (diff)
downloadcraftbukkit-a21f038fc335c6d9e77290e613937c234d0a15a1.tar
craftbukkit-a21f038fc335c6d9e77290e613937c234d0a15a1.tar.gz
craftbukkit-a21f038fc335c6d9e77290e613937c234d0a15a1.tar.lz
craftbukkit-a21f038fc335c6d9e77290e613937c234d0a15a1.tar.xz
craftbukkit-a21f038fc335c6d9e77290e613937c234d0a15a1.zip
Mark entities as invalid when they get despawned. Addresses BUKKIT-810
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java4
1 files changed, 4 insertions, 0 deletions
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;
}