diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 8ffe6806..a9b27a94 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -801,23 +801,37 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI { } } else if(c.equals("radiusrender") && checkPlayerPermission(sender,"radiusrender")) { - if (player != null) { - int radius = 0; - String mapname = null; - if(args.length > 1) { - radius = Integer.parseInt(args[1]); /* Parse radius */ - if(radius < 0) - radius = 0; - if(args.length > 2) - mapname = args[2]; + int radius = 0; + String mapname = null; + Location loc = null; + if(args.length == 2) { /* Just radius */ + radius = Integer.parseInt(args[1]); /* Parse radius */ + if(radius < 0) + radius = 0; + if(args.length > 2) + mapname = args[2]; + if (player != null) + loc = player.getLocation(); + else + sender.sendMessage("Command require if issued from console."); + } + else if(args.length > 3) { /* */ + DynmapWorld w = mapManager.worldsLookup.get(args[1]); /* Look up world */ + if(w == null) { + sender.sendMessage("World '" + args[1] + "' not defined/loaded"); } - Location loc = player.getLocation(); - if(loc != null) - mapManager.renderWorldRadius(loc, sender, mapname, radius); - } - else { - sender.sendMessage("Command can only be issued by player."); + double x = 0, z = 0; + x = Double.parseDouble(args[2]); + z = Double.parseDouble(args[3]); + if(args.length > 4) + radius = Integer.parseInt(args[4]); + if(args.length > 5) + mapname = args[5]; + if(w != null) + loc = new Location(w.world, x, 64.0, z); } + if(loc != null) + mapManager.renderWorldRadius(loc, sender, mapname, radius); } else if (c.equals("hide")) { if (args.length == 1) { if(player != null && checkPlayerPermission(sender,"hide.self")) { diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 27dec444..09938249 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -17,6 +17,8 @@ commands: / fullrender world:mapname - Render map 'mapname' of world 'world'. / radiusrender ## - Render at least ## block radius from your location on all maps. / radiusrender ## mapname - Render at least ## block radius from your location on map 'mapname' + / radiusrender worldname x z ## - Render at least ## block radius from location x,z on world 'worldname' + / radiusrender worldname x z ## mapname - Render at least ## block radius from location x,z on world 'worldname' on map 'mapname' / cancelrender - Cancels any active renders on current world / cancelrender world - Cancels any active renders of world 'world' / stats - Show render statistics.