forked from kaboomserver/extras
Remove excessive check
This commit is contained in:
parent
3d1581d5b4
commit
9e03cd15f5
2 changed files with 3 additions and 16 deletions
|
@ -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 ||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue