summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-04-01 09:15:48 +0200
committerErik Broes <erikbroes@grum.nl>2011-04-01 09:15:48 +0200
commitc0a78fa6c63a918774ba24c302af76613dd4e7af (patch)
treebba6ed6b59f207f8ea7830eab3c8ab429c7c2940
parent7eeb0d8f4a16bf0531ef925b6252b41f54d71e13 (diff)
downloadcraftbukkit-c0a78fa6c63a918774ba24c302af76613dd4e7af.tar
craftbukkit-c0a78fa6c63a918774ba24c302af76613dd4e7af.tar.gz
craftbukkit-c0a78fa6c63a918774ba24c302af76613dd4e7af.tar.lz
craftbukkit-c0a78fa6c63a918774ba24c302af76613dd4e7af.tar.xz
craftbukkit-c0a78fa6c63a918774ba24c302af76613dd4e7af.zip
Exempt players from calling CreatureSpawn
-rw-r--r--src/main/java/net/minecraft/server/World.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cadaf7d3..7686f62b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -720,7 +720,7 @@ public class World implements IBlockAccess {
}
// CraftBukkit start
- if (entity instanceof EntityLiving) {
+ if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
if (event.isCancelled()) {
return false;
@@ -1578,7 +1578,7 @@ public class World implements IBlockAccess {
for (int i = 0; i < list.size(); ++i) {
entity = (Entity) list.get(i);
// CraftBukkit start
- if (entity instanceof EntityLiving) {
+ if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
if (event.isCancelled()) {
continue;