final GlowServer server = player.getServer();
final InetAddress address = player.getAddress().getAddress();
final String addressString = address.getHostAddress();
final PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, address);
final BanList nameBans = server.getBanList(BanList.Type.NAME);
final BanList ipBans = server.getBanList(BanList.Type.IP);
if (nameBans.isBanned(player.getName())) {
event.disallow(PlayerLoginEvent.Result.KICK_BANNED,
"Banned: " + nameBans.getBanEntry(player.getName()).getReason());
} else if (ipBans.isBanned(addressString)) {
event.disallow(PlayerLoginEvent.Result.KICK_BANNED,
"Banned: " + ipBans.getBanEntry(addressString).getReason());
} else if (server.hasWhitelist() && !player.isWhitelisted()) {
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST,
"You are not whitelisted on this server.");
} else if (server.getOnlinePlayers().size() >= server.getMaxPlayers()) {
event.disallow(PlayerLoginEvent.Result.KICK_FULL,