Trap on bogus world names or player with bad current location
This commit is contained in:
parent
95cc3ae869
commit
dcdfb3da5d
2 changed files with 8 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue