From 9e03cd15f5c15d5e22e483ced4740660a81cf95f Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 1 Aug 2019 18:58:35 +0300 Subject: [PATCH] Remove excessive check --- .../kaboom/extras/modules/entity/EntitySpawn.java | 13 ------------- .../extras/modules/player/PlayerConnection.java | 6 +++--- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java b/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java index 0ce65a9..c62c93c 100644 --- a/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java +++ b/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java @@ -25,8 +25,6 @@ import org.bukkit.event.entity.EntitySpawnEvent; import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.entity.SpawnerSpawnEvent; -import org.bukkit.event.world.ChunkLoadEvent; - import org.bukkit.inventory.ItemStack; import com.destroystokyo.paper.event.block.TNTPrimeEvent; @@ -36,17 +34,6 @@ import com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent; import com.destroystokyo.paper.event.entity.PreSpawnerSpawnEvent; class EntitySpawn implements Listener { - @EventHandler - void onChunkLoad(ChunkLoadEvent event) { - final int count = event.getChunk().getEntities().length; - - if (count > 50) { - for (int i = 51; i <= count; i++) { - event.getChunk().getEntities()[i].remove(); - } - } - } - @EventHandler void onCreatureSpawn(CreatureSpawnEvent event) { if (event.getSpawnReason() == SpawnReason.CUSTOM || diff --git a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java index 7806a83..94b7652 100644 --- a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java +++ b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java @@ -86,10 +86,10 @@ class PlayerConnection implements Listener { @EventHandler void onPlayerLogin(PlayerLoginEvent event) { - if (!(event.getHostname().startsWith("play.kaboom.pw") && + /*if (!(event.getHostname().startsWith("play.kaboom.pw") && event.getHostname().endsWith(":53950"))) { event.disallow(Result.KICK_OTHER, "You connected to the server using an outdated server address/IP.\nPlease use the following address/IP:\n\nkaboom.pw"); - } else { + } else {*/ final Player player = event.getPlayer(); event.allow(); @@ -101,7 +101,7 @@ class PlayerConnection implements Listener { } catch (Exception exception) { } main.playerProfile.remove(player.getName()); - } + /*}*/ } @EventHandler