Trap on bogus world names or player with bad current location

This commit is contained in:
Mike Primm 2011-05-08 22:27:03 -05:00 committed by FrozenCow
parent 95cc3ae869
commit dcdfb3da5d
2 changed files with 8 additions and 5 deletions

View file

@ -349,11 +349,14 @@ public class DynmapPlugin extends JavaPlugin {
if (args.length > 1) {
for (int i = 1; i < args.length; i++) {
World w = getServer().getWorld(args[i]);
mapManager.renderFullWorld(new Location(w, 0, 0, 0));
if(w != null)
mapManager.renderFullWorld(new Location(w, 0, 0, 0));
}
return true;
} else if (player != null) {
mapManager.renderFullWorld(player.getLocation());
Location loc = player.getLocation();
if(loc != null)
mapManager.renderFullWorld(loc);
return true;
}
}