wiz makes a good point -- PROBABLY should not delete players.

This commit is contained in:
sk89q 2011-06-20 19:35:14 -07:00
parent c9f99e0903
commit 4f3198b1bd
3 changed files with 9 additions and 3 deletions

View File

@ -125,7 +125,9 @@ public void onPlayerJoin(PlayerJoinEvent event) {
for (Entity entity : player.getWorld().getEntities()) { for (Entity entity : player.getWorld().getEntities()) {
if (entity instanceof Item if (entity instanceof Item
|| (entity instanceof LivingEntity && !(entity instanceof Tameable))) { || (entity instanceof LivingEntity
&& !(entity instanceof Tameable)
&& !(entity instanceof Player))) {
entity.remove(); entity.remove();
removed++; removed++;
} }

View File

@ -51,7 +51,9 @@ public void onChunkLoad(ChunkLoadEvent event) {
for (Entity entity : event.getChunk().getEntities()) { for (Entity entity : event.getChunk().getEntities()) {
if (entity instanceof Item if (entity instanceof Item
|| (entity instanceof LivingEntity && !(entity instanceof Tameable))) { || (entity instanceof LivingEntity
&& !(entity instanceof Tameable)
&& !(entity instanceof Player))) {
entity.remove(); entity.remove();
removed++; removed++;
} }

View File

@ -116,7 +116,9 @@ public static void stopLag(CommandContext args, WorldGuardPlugin plugin,
for (Entity entity : world.getEntities()) { for (Entity entity : world.getEntities()) {
if (entity instanceof Item if (entity instanceof Item
|| (entity instanceof LivingEntity && !(entity instanceof Tameable))) { || (entity instanceof LivingEntity
&& !(entity instanceof Tameable)
&& !(entity instanceof Player))) {
entity.remove(); entity.remove();
removed++; removed++;
} }