mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +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()) {
|
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++;
|
||||||
}
|
}
|
||||||
|
@ -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++;
|
||||||
}
|
}
|
||||||
|
@ -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++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user