Ensure that the world players are going to is not null

This commit is contained in:
Eric Stokes 2011-09-28 17:02:21 -06:00
parent 1a6e93f0df
commit f0ae8cbb8e

View File

@ -173,6 +173,9 @@ public class MVPlayerListener extends PlayerListener {
}
}
if (fromWorld != null) {
if (toWorld == null) {
return true;
}
if (fromWorld.getWorldBlacklist().contains(toWorld.getName())) {
player.sendMessage("You don't have access to go to " + toWorld.getColoredWorldString() + " from " + fromWorld.getColoredWorldString());
return true;