Fixed NPE in onPlayerLogin due unnecessary kickPlayer() call

This commit is contained in:
t3hk0d3 2011-08-09 19:39:09 +04:00
parent 55450065ce
commit 66b226216d

View File

@ -78,7 +78,7 @@ public class PlayerListener extends ModifyworldListener {
if (user != null && !user.has("modifyworld.login", Bukkit.getServer().getWorlds().get(0).getName())) {
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, whitelistKickMessage);
event.getPlayer().kickPlayer(whitelistKickMessage);
//event.getPlayer().kickPlayer(whitelistKickMessage);
Logger.getLogger("Minecraft").info("Player \"" + user.getName() + "\" were kicked by Modifyworld - lack of modifyworld.login permission");
}
}