mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 10:37:41 +01:00
wiz makes a good point -- PROBABLY should not delete players.
This commit is contained in:
parent
c9f99e0903
commit
4f3198b1bd
@ -125,7 +125,9 @@ public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
|
||||
for (Entity entity : player.getWorld().getEntities()) {
|
||||
if (entity instanceof Item
|
||||
|| (entity instanceof LivingEntity && !(entity instanceof Tameable))) {
|
||||
|| (entity instanceof LivingEntity
|
||||
&& !(entity instanceof Tameable)
|
||||
&& !(entity instanceof Player))) {
|
||||
entity.remove();
|
||||
removed++;
|
||||
}
|
||||
|
@ -51,7 +51,9 @@ public void onChunkLoad(ChunkLoadEvent event) {
|
||||
|
||||
for (Entity entity : event.getChunk().getEntities()) {
|
||||
if (entity instanceof Item
|
||||
|| (entity instanceof LivingEntity && !(entity instanceof Tameable))) {
|
||||
|| (entity instanceof LivingEntity
|
||||
&& !(entity instanceof Tameable)
|
||||
&& !(entity instanceof Player))) {
|
||||
entity.remove();
|
||||
removed++;
|
||||
}
|
||||
|
@ -116,7 +116,9 @@ public static void stopLag(CommandContext args, WorldGuardPlugin plugin,
|
||||
|
||||
for (Entity entity : world.getEntities()) {
|
||||
if (entity instanceof Item
|
||||
|| (entity instanceof LivingEntity && !(entity instanceof Tameable))) {
|
||||
|| (entity instanceof LivingEntity
|
||||
&& !(entity instanceof Tameable)
|
||||
&& !(entity instanceof Player))) {
|
||||
entity.remove();
|
||||
removed++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user