diff --git a/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java b/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java index 8c88ce59..4600d9fd 100644 --- a/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java +++ b/DynmapCore/src/main/java/org/dynmap/MarkersComponent.java @@ -31,6 +31,7 @@ public class MarkersComponent extends ClientComponent { private MarkerSet spawnbedset; private MarkerIcon spawnbedicon; private String spawnbedformat; + private boolean removebedonplayerleave; private long maxofflineage; private boolean showSpawn; private boolean showBorder; @@ -180,7 +181,7 @@ public class MarkersComponent extends ClientComponent { spawnbedicon = api.getMarkerIcon(configuration.getString("spawnbedicon", "bed")); spawnbedformat = configuration.getString("spawnbedformat", "%name%'s bed"); - + removebedonplayerleave = configuration.getBoolean("spawnbedremoveonplayerleave", true); /* Add listener for players coming and going */ core.listenerManager.addListener(EventType.PLAYER_JOIN, new PlayerEventListener() { @Override @@ -188,15 +189,17 @@ public class MarkersComponent extends ClientComponent { updatePlayer(p); } }); - core.listenerManager.addListener(EventType.PLAYER_QUIT, new PlayerEventListener() { - @Override - public void playerEvent(DynmapPlayer p) { - Marker m = spawnbedset.findMarker(p.getName()+"_bed"); - if(m != null) { - m.deleteMarker(); + if (removebedonplayerleave) { + core.listenerManager.addListener(EventType.PLAYER_QUIT, new PlayerEventListener() { + @Override + public void playerEvent(DynmapPlayer p) { + Marker m = spawnbedset.findMarker(p.getName() + "_bed"); + if (m != null) { + m.deleteMarker(); + } } - } - }); + }); + } core.listenerManager.addListener(EventType.PLAYER_BED_LEAVE, new PlayerEventListener() { @Override public void playerEvent(final DynmapPlayer p) { diff --git a/fabric-1.14.4/src/main/resources/configuration.txt b/fabric-1.14.4/src/main/resources/configuration.txt index abd83953..e0334afa 100644 --- a/fabric-1.14.4/src/main/resources/configuration.txt +++ b/fabric-1.14.4/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.15.2/src/main/resources/configuration.txt b/fabric-1.15.2/src/main/resources/configuration.txt index abd83953..e0334afa 100644 --- a/fabric-1.15.2/src/main/resources/configuration.txt +++ b/fabric-1.15.2/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.16.4/src/main/resources/configuration.txt b/fabric-1.16.4/src/main/resources/configuration.txt index aa783b19..c8205d76 100644 --- a/fabric-1.16.4/src/main/resources/configuration.txt +++ b/fabric-1.16.4/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.17.1/src/main/resources/configuration.txt b/fabric-1.17.1/src/main/resources/configuration.txt index aa783b19..c8205d76 100644 --- a/fabric-1.17.1/src/main/resources/configuration.txt +++ b/fabric-1.17.1/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.18.2/src/main/resources/configuration.txt b/fabric-1.18.2/src/main/resources/configuration.txt index 71cccfb9..b1f4d747 100644 --- a/fabric-1.18.2/src/main/resources/configuration.txt +++ b/fabric-1.18.2/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.19.4/src/main/resources/configuration.txt b/fabric-1.19.4/src/main/resources/configuration.txt index bb8b456c..c17b0b96 100644 --- a/fabric-1.19.4/src/main/resources/configuration.txt +++ b/fabric-1.19.4/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.20.2/src/main/resources/configuration.txt b/fabric-1.20.2/src/main/resources/configuration.txt index bb8b456c..c17b0b96 100644 --- a/fabric-1.20.2/src/main/resources/configuration.txt +++ b/fabric-1.20.2/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.20.4/src/main/resources/configuration.txt b/fabric-1.20.4/src/main/resources/configuration.txt index bb8b456c..c17b0b96 100644 --- a/fabric-1.20.4/src/main/resources/configuration.txt +++ b/fabric-1.20.4/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/fabric-1.20/src/main/resources/configuration.txt b/fabric-1.20/src/main/resources/configuration.txt index bb8b456c..c17b0b96 100644 --- a/fabric-1.20/src/main/resources/configuration.txt +++ b/fabric-1.20/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.12.2/src/main/resources/configuration.txt b/forge-1.12.2/src/main/resources/configuration.txt index 77eda7b6..75c3d207 100644 --- a/forge-1.12.2/src/main/resources/configuration.txt +++ b/forge-1.12.2/src/main/resources/configuration.txt @@ -130,6 +130,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.14.4/src/main/resources/configuration.txt b/forge-1.14.4/src/main/resources/configuration.txt index dec35ccc..4c2fbf50 100644 --- a/forge-1.14.4/src/main/resources/configuration.txt +++ b/forge-1.14.4/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.15.2/src/main/resources/configuration.txt b/forge-1.15.2/src/main/resources/configuration.txt index dec35ccc..4c2fbf50 100644 --- a/forge-1.15.2/src/main/resources/configuration.txt +++ b/forge-1.15.2/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.16.5/src/main/resources/configuration.txt b/forge-1.16.5/src/main/resources/configuration.txt index eb4b28da..38174f81 100644 --- a/forge-1.16.5/src/main/resources/configuration.txt +++ b/forge-1.16.5/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.17.1/src/main/resources/configuration.txt b/forge-1.17.1/src/main/resources/configuration.txt index 8d72ac3b..9257fbaa 100644 --- a/forge-1.17.1/src/main/resources/configuration.txt +++ b/forge-1.17.1/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.18.2/src/main/resources/configuration.txt b/forge-1.18.2/src/main/resources/configuration.txt index eb4b28da..38174f81 100644 --- a/forge-1.18.2/src/main/resources/configuration.txt +++ b/forge-1.18.2/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.19.3/src/main/resources/configuration.txt b/forge-1.19.3/src/main/resources/configuration.txt index eb4b28da..38174f81 100644 --- a/forge-1.19.3/src/main/resources/configuration.txt +++ b/forge-1.19.3/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.20.2/src/main/resources/configuration.txt b/forge-1.20.2/src/main/resources/configuration.txt index eb4b28da..38174f81 100644 --- a/forge-1.20.2/src/main/resources/configuration.txt +++ b/forge-1.20.2/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/forge-1.20/src/main/resources/configuration.txt b/forge-1.20/src/main/resources/configuration.txt index eb4b28da..38174f81 100644 --- a/forge-1.20/src/main/resources/configuration.txt +++ b/forge-1.20/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) Show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border" diff --git a/spigot/src/main/resources/configuration.txt b/spigot/src/main/resources/configuration.txt index 2fc3fe00..84a2acb3 100644 --- a/spigot/src/main/resources/configuration.txt +++ b/spigot/src/main/resources/configuration.txt @@ -143,6 +143,7 @@ components: spawnbedhidebydefault: true spawnbedminzoom: 0 spawnbedformat: "%name%'s bed" + spawnbedremoveonplayerleave: true # (optional) show world border (vanilla 1.8+) showworldborder: true worldborderlabel: "Border"