Add /dynmap radiusrender <world> <x> <z> <radius> - console usable radiusrender
This commit is contained in:
parent
96e4742bfe
commit
5dedf1d6e8
2 changed files with 31 additions and 15 deletions
|
|
@ -801,23 +801,37 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(c.equals("radiusrender") && checkPlayerPermission(sender,"radiusrender")) {
|
else if(c.equals("radiusrender") && checkPlayerPermission(sender,"radiusrender")) {
|
||||||
if (player != null) {
|
int radius = 0;
|
||||||
int radius = 0;
|
String mapname = null;
|
||||||
String mapname = null;
|
Location loc = null;
|
||||||
if(args.length > 1) {
|
if(args.length == 2) { /* Just radius */
|
||||||
radius = Integer.parseInt(args[1]); /* Parse radius */
|
radius = Integer.parseInt(args[1]); /* Parse radius */
|
||||||
if(radius < 0)
|
if(radius < 0)
|
||||||
radius = 0;
|
radius = 0;
|
||||||
if(args.length > 2)
|
if(args.length > 2)
|
||||||
mapname = args[2];
|
mapname = args[2];
|
||||||
|
if (player != null)
|
||||||
|
loc = player.getLocation();
|
||||||
|
else
|
||||||
|
sender.sendMessage("Command require <world> <x> <z> <radius> if issued from console.");
|
||||||
|
}
|
||||||
|
else if(args.length > 3) { /* <world> <x> <z> */
|
||||||
|
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();
|
double x = 0, z = 0;
|
||||||
if(loc != null)
|
x = Double.parseDouble(args[2]);
|
||||||
mapManager.renderWorldRadius(loc, sender, mapname, radius);
|
z = Double.parseDouble(args[3]);
|
||||||
}
|
if(args.length > 4)
|
||||||
else {
|
radius = Integer.parseInt(args[4]);
|
||||||
sender.sendMessage("Command can only be issued by player.");
|
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")) {
|
} else if (c.equals("hide")) {
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
if(player != null && checkPlayerPermission(sender,"hide.self")) {
|
if(player != null && checkPlayerPermission(sender,"hide.self")) {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ commands:
|
||||||
/<command> fullrender world:mapname - Render map 'mapname' of world 'world'.
|
/<command> fullrender world:mapname - Render map 'mapname' of world 'world'.
|
||||||
/<command> radiusrender ## - Render at least ## block radius from your location on all maps.
|
/<command> radiusrender ## - Render at least ## block radius from your location on all maps.
|
||||||
/<command> radiusrender ## mapname - Render at least ## block radius from your location on map 'mapname'
|
/<command> radiusrender ## mapname - Render at least ## block radius from your location on map 'mapname'
|
||||||
|
/<command> radiusrender worldname x z ## - Render at least ## block radius from location x,z on world 'worldname'
|
||||||
|
/<command> radiusrender worldname x z ## mapname - Render at least ## block radius from location x,z on world 'worldname' on map 'mapname'
|
||||||
/<command> cancelrender - Cancels any active renders on current world
|
/<command> cancelrender - Cancels any active renders on current world
|
||||||
/<command> cancelrender world - Cancels any active renders of world 'world'
|
/<command> cancelrender world - Cancels any active renders of world 'world'
|
||||||
/<command> stats - Show render statistics.
|
/<command> stats - Show render statistics.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue