Fix for command to enable/disable Dynmap border display not reporting correctly whether it's now enabled or disabled when run

Also added variables for Dynmap border color/thickness/opacity, just for internal clarity... will also simplify things if I or someone else ever gets around to adding settings for those values, to allow them to be changed
This commit is contained in:
Brettflan 2012-11-04 15:14:12 -06:00
parent 470b19160d
commit 7b8d78ec12
2 changed files with 6 additions and 4 deletions

View File

@ -22,6 +22,9 @@ public class DynMapFeatures
private static DynmapAPI api;
private static MarkerAPI markApi;
private static MarkerSet markSet;
private static int lineWeight = 3;
private static double lineOpacity = 1.0;
private static int lineColor = 0xFF0000;
// Whether re-rendering functionality is available
public static boolean renderEnabled()
@ -176,7 +179,7 @@ public class DynMapFeatures
if (marker == null)
{
marker = markSet.createCircleMarker("worldborder_"+worldName, Config.DynmapMessage(), false, worldName, border.getX(), 64.0, border.getZ(), border.getRadius(), border.getRadius(), true);
marker.setLineStyle(3, 1.0, 0xFF0000);
marker.setLineStyle(lineWeight, lineOpacity, lineColor);
marker.setFillStyle(0.0, 0x000000);
roundBorders.put(worldName, marker);
}

View File

@ -563,11 +563,10 @@ public class WBCommand implements CommandExecutor
Config.setDynmapBorderEnabled(strAsBool(split[1]));
if (player != null)
Config.Log((Config.Debug() ? "Enabling" : "Disabling") + " DynMap border display at the command of player \"" + player.getName() + "\".");
sender.sendMessage("DynMap border display " + (Config.Debug() ? "enabled" : "disabled") + ".");
if (player != null)
sender.sendMessage("DynMap border display " + (Config.Debug() ? "enabled" : "disabled") + ".");
Config.Log((Config.DynmapBorderEnabled() ? "Enabled" : "Disabled") + " DynMap border display at the command of player \"" + player.getName() + "\".");
}
// "dynmapmsg" command from player or console