Merge pull request #2841 from paulstraw/feature/worldborderlabel

Add `worldborderlabel` configuration.txt setting
This commit is contained in:
mikeprimm 2020-04-12 19:31:06 -05:00 committed by GitHub
commit 7f7ab08fe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 1 deletions

View File

@ -25,6 +25,7 @@ public class MarkersComponent extends ClientComponent {
private MarkerSignManager signmgr; private MarkerSignManager signmgr;
private MarkerIcon spawnicon; private MarkerIcon spawnicon;
private String spawnlbl; private String spawnlbl;
private String worldborderlbl;
private MarkerSet offlineset; private MarkerSet offlineset;
private MarkerIcon offlineicon; private MarkerIcon offlineicon;
private MarkerSet spawnbedset; private MarkerSet spawnbedset;
@ -57,6 +58,9 @@ public class MarkersComponent extends ClientComponent {
spawnicon = api.getMarkerIcon(MarkerIcon.WORLD); spawnicon = api.getMarkerIcon(MarkerIcon.WORLD);
} }
} }
if (showBorder) {
worldborderlbl = configuration.getString("worldborderlabel", "Border");
}
if (showSpawn || showBorder) { if (showSpawn || showBorder) {
/* Add listener for world loads */ /* Add listener for world loads */
WorldEventListener wel = new WorldEventListener() { WorldEventListener wel = new WorldEventListener() {
@ -280,7 +284,7 @@ public class MarkersComponent extends ClientComponent {
} }
} }
if (am == null) { 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 { else {
am.setCornerLocations(x, z); am.setCornerLocations(x, z);

View File

@ -127,6 +127,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) Show world border (vanilla 1.8+) # (optional) Show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat

View File

@ -127,6 +127,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) Show world border (vanilla 1.8+) # (optional) Show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat

View File

@ -127,6 +127,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) Show world border (vanilla 1.8+) # (optional) Show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat

View File

@ -127,6 +127,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) Show world border (vanilla 1.8+) # (optional) Show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat

View File

@ -127,6 +127,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) Show world border (vanilla 1.8+) # (optional) Show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat

View File

@ -127,6 +127,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) Show world border (vanilla 1.8+) # (optional) Show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat

View File

@ -128,6 +128,7 @@ components:
spawnbedformat: "%name%'s bed" spawnbedformat: "%name%'s bed"
# (optional) show world border (vanilla 1.8+) # (optional) show world border (vanilla 1.8+)
showworldborder: true showworldborder: true
worldborderlabel: "Border"
- class: org.dynmap.ClientComponent - class: org.dynmap.ClientComponent
type: chat type: chat