From 3937ece59a68126c44772c607379fd2234298339 Mon Sep 17 00:00:00 2001 From: Paul Straw Date: Thu, 2 Apr 2020 22:01:30 -0700 Subject: [PATCH] Adds `worldborderlabel` configuration.txt setting --- DynmapCore/src/main/java/org/dynmap/MarkersComponent.java | 6 +++++- forge-1.10.2/src/main/resources/configuration.txt | 1 + forge-1.11.2/src/main/resources/configuration.txt | 1 + forge-1.12.2/src/main/resources/configuration.txt | 1 + forge-1.13.2/src/main/resources/configuration.txt | 1 + forge-1.8.9/src/main/resources/configuration.txt | 1 + forge-1.9.4/src/main/resources/configuration.txt | 1 + spigot/src/main/resources/configuration.txt | 1 + 8 files changed, 12 insertions(+), 1 deletion(-) diff --git a/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java b/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java index c48772c7..8c88ce59 100644 --- a/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java +++ b/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java @@ -25,6 +25,7 @@ public class MarkersComponent extends ClientComponent { private MarkerSignManager signmgr; private MarkerIcon spawnicon; private String spawnlbl; + private String worldborderlbl; private MarkerSet offlineset; private MarkerIcon offlineicon; private MarkerSet spawnbedset; @@ -57,6 +58,9 @@ public class MarkersComponent extends ClientComponent { spawnicon = api.getMarkerIcon(MarkerIcon.WORLD); } } + if (showBorder) { + worldborderlbl = configuration.getString("worldborderlabel", "Border"); + } if (showSpawn || showBorder) { /* Add listener for world loads */ WorldEventListener wel = new WorldEventListener() { @@ -280,7 +284,7 @@ public class MarkersComponent extends ClientComponent { } } if (am == null) { - am = ms.createAreaMarker(borderid, "Border", false, w.getName(), x, z, false); + am = ms.createAreaMarker(borderid, worldborderlbl, false, w.getName(), x, z, false); } else { am.setCornerLocations(x, z); diff --git a/forge-1.10.2/src/main/resources/configuration.txt b/forge-1.10.2/src/main/resources/configuration.txt index d67e9baa..2d33f6db 100644 --- a/forge-1.10.2/src/main/resources/configuration.txt +++ b/forge-1.10.2/src/main/resources/configuration.txt @@ -127,6 +127,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) Show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat diff --git a/forge-1.11.2/src/main/resources/configuration.txt b/forge-1.11.2/src/main/resources/configuration.txt index d67e9baa..2d33f6db 100644 --- a/forge-1.11.2/src/main/resources/configuration.txt +++ b/forge-1.11.2/src/main/resources/configuration.txt @@ -127,6 +127,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) Show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat diff --git a/forge-1.12.2/src/main/resources/configuration.txt b/forge-1.12.2/src/main/resources/configuration.txt index d67e9baa..2d33f6db 100644 --- a/forge-1.12.2/src/main/resources/configuration.txt +++ b/forge-1.12.2/src/main/resources/configuration.txt @@ -127,6 +127,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) Show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat diff --git a/forge-1.13.2/src/main/resources/configuration.txt b/forge-1.13.2/src/main/resources/configuration.txt index d67e9baa..2d33f6db 100644 --- a/forge-1.13.2/src/main/resources/configuration.txt +++ b/forge-1.13.2/src/main/resources/configuration.txt @@ -127,6 +127,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) Show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat diff --git a/forge-1.8.9/src/main/resources/configuration.txt b/forge-1.8.9/src/main/resources/configuration.txt index d67e9baa..2d33f6db 100644 --- a/forge-1.8.9/src/main/resources/configuration.txt +++ b/forge-1.8.9/src/main/resources/configuration.txt @@ -127,6 +127,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) Show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat diff --git a/forge-1.9.4/src/main/resources/configuration.txt b/forge-1.9.4/src/main/resources/configuration.txt index d67e9baa..2d33f6db 100644 --- a/forge-1.9.4/src/main/resources/configuration.txt +++ b/forge-1.9.4/src/main/resources/configuration.txt @@ -127,6 +127,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) Show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat diff --git a/spigot/src/main/resources/configuration.txt b/spigot/src/main/resources/configuration.txt index 10aee57e..9de84ea6 100644 --- a/spigot/src/main/resources/configuration.txt +++ b/spigot/src/main/resources/configuration.txt @@ -128,6 +128,7 @@ components: spawnbedformat: "%name%'s bed" # (optional) show world border (vanilla 1.8+) showworldborder: true + worldborderlabel: "Border" - class: org.dynmap.ClientComponent type: chat