mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-10-02 04:37:30 +02:00
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:
parent
470b19160d
commit
7b8d78ec12
@ -22,6 +22,9 @@ public class DynMapFeatures
|
|||||||
private static DynmapAPI api;
|
private static DynmapAPI api;
|
||||||
private static MarkerAPI markApi;
|
private static MarkerAPI markApi;
|
||||||
private static MarkerSet markSet;
|
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
|
// Whether re-rendering functionality is available
|
||||||
public static boolean renderEnabled()
|
public static boolean renderEnabled()
|
||||||
@ -176,7 +179,7 @@ public class DynMapFeatures
|
|||||||
if (marker == null)
|
if (marker == null)
|
||||||
{
|
{
|
||||||
marker = markSet.createCircleMarker("worldborder_"+worldName, Config.DynmapMessage(), false, worldName, border.getX(), 64.0, border.getZ(), border.getRadius(), border.getRadius(), true);
|
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);
|
marker.setFillStyle(0.0, 0x000000);
|
||||||
roundBorders.put(worldName, marker);
|
roundBorders.put(worldName, marker);
|
||||||
}
|
}
|
||||||
|
@ -563,11 +563,10 @@ public class WBCommand implements CommandExecutor
|
|||||||
|
|
||||||
Config.setDynmapBorderEnabled(strAsBool(split[1]));
|
Config.setDynmapBorderEnabled(strAsBool(split[1]));
|
||||||
|
|
||||||
if (player != null)
|
sender.sendMessage("DynMap border display " + (Config.Debug() ? "enabled" : "disabled") + ".");
|
||||||
Config.Log((Config.Debug() ? "Enabling" : "Disabling") + " DynMap border display at the command of player \"" + player.getName() + "\".");
|
|
||||||
|
|
||||||
if (player != null)
|
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
|
// "dynmapmsg" command from player or console
|
||||||
|
Loading…
Reference in New Issue
Block a user