mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2025-01-07 00:17:45 +01:00
Merge pull request #93 from joblo2213/master
Custom dynmap layer priority and hide by default
This commit is contained in:
commit
208169be49
@ -49,6 +49,8 @@ public class Config
|
|||||||
private static boolean portalRedirection = true;
|
private static boolean portalRedirection = true;
|
||||||
private static boolean dynmapEnable = true;
|
private static boolean dynmapEnable = true;
|
||||||
private static String dynmapMessage;
|
private static String dynmapMessage;
|
||||||
|
private static int dynmapPriority;
|
||||||
|
private static boolean dynmapHideByDefault;
|
||||||
private static int remountDelayTicks = 0;
|
private static int remountDelayTicks = 0;
|
||||||
private static boolean killPlayer = false;
|
private static boolean killPlayer = false;
|
||||||
private static boolean denyEnderpearl = false;
|
private static boolean denyEnderpearl = false;
|
||||||
@ -407,6 +409,14 @@ public class Config
|
|||||||
return dynmapMessage;
|
return dynmapMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean DynmapHideByDefault() {
|
||||||
|
return dynmapHideByDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int DynmapPriority() {
|
||||||
|
return dynmapPriority;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setPlayerBypass(UUID player, boolean bypass)
|
public static void setPlayerBypass(UUID player, boolean bypass)
|
||||||
{
|
{
|
||||||
if (bypass)
|
if (bypass)
|
||||||
@ -597,6 +607,8 @@ public class Config
|
|||||||
remountDelayTicks = cfg.getInt("remount-delay-ticks", 0);
|
remountDelayTicks = cfg.getInt("remount-delay-ticks", 0);
|
||||||
dynmapEnable = cfg.getBoolean("dynmap-border-enabled", true);
|
dynmapEnable = cfg.getBoolean("dynmap-border-enabled", true);
|
||||||
dynmapMessage = cfg.getString("dynmap-border-message", "The border of the world.");
|
dynmapMessage = cfg.getString("dynmap-border-message", "The border of the world.");
|
||||||
|
dynmapHideByDefault = cfg.getBoolean("dynmap-broder-hideByDefault", false);
|
||||||
|
dynmapPriority = cfg.getInt("dynmap-border-priority",0);
|
||||||
logConfig("Using " + (ShapeName()) + " border, knockback of " + knockBack + " blocks, and timer delay of " + timerTicks + ".");
|
logConfig("Using " + (ShapeName()) + " border, knockback of " + knockBack + " blocks, and timer delay of " + timerTicks + ".");
|
||||||
killPlayer = cfg.getBoolean("player-killed-bad-spawn", false);
|
killPlayer = cfg.getBoolean("player-killed-bad-spawn", false);
|
||||||
denyEnderpearl = cfg.getBoolean("deny-enderpearl", true);
|
denyEnderpearl = cfg.getBoolean("deny-enderpearl", true);
|
||||||
@ -706,6 +718,8 @@ public class Config
|
|||||||
cfg.set("remount-delay-ticks", remountDelayTicks);
|
cfg.set("remount-delay-ticks", remountDelayTicks);
|
||||||
cfg.set("dynmap-border-enabled", dynmapEnable);
|
cfg.set("dynmap-border-enabled", dynmapEnable);
|
||||||
cfg.set("dynmap-border-message", dynmapMessage);
|
cfg.set("dynmap-border-message", dynmapMessage);
|
||||||
|
cfg.set("dynmap-broder-hideByDefault", dynmapHideByDefault);
|
||||||
|
cfg.set("dynmap-border-priority", dynmapPriority);
|
||||||
cfg.set("player-killed-bad-spawn", killPlayer);
|
cfg.set("player-killed-bad-spawn", killPlayer);
|
||||||
cfg.set("deny-enderpearl", denyEnderpearl);
|
cfg.set("deny-enderpearl", denyEnderpearl);
|
||||||
cfg.set("fill-autosave-frequency", fillAutosaveFrequency);
|
cfg.set("fill-autosave-frequency", fillAutosaveFrequency);
|
||||||
|
@ -150,7 +150,8 @@ public class DynMapFeatures
|
|||||||
markSet = markApi.createMarkerSet("worldborder.markerset", "WorldBorder", null, false);
|
markSet = markApi.createMarkerSet("worldborder.markerset", "WorldBorder", null, false);
|
||||||
else
|
else
|
||||||
markSet.setMarkerSetLabel("WorldBorder");
|
markSet.setMarkerSetLabel("WorldBorder");
|
||||||
|
markSet.setLayerPriority(Config.DynmapPriority());
|
||||||
|
markSet.setHideByDefault(Config.DynmapHideByDefault());
|
||||||
Map<String, BorderData> borders = Config.getBorders();
|
Map<String, BorderData> borders = Config.getBorders();
|
||||||
for(Entry<String, BorderData> stringBorderDataEntry : borders.entrySet())
|
for(Entry<String, BorderData> stringBorderDataEntry : borders.entrySet())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user