From d941aec6eb735dea3155de989e2a8389eb25b8d3 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sat, 12 Feb 2022 01:30:00 -0600 Subject: [PATCH] Add publicURL setting and '/dynmap url' command --- .../src/main/java/org/dynmap/DynmapCore.java | 17 +++++++++++++++-- .../src/main/resources/configuration.txt | 4 ++++ .../src/main/resources/configuration.txt | 6 +++++- .../src/main/resources/configuration.txt | 6 +++++- .../src/main/resources/configuration.txt | 6 +++++- .../src/main/resources/configuration.txt | 6 +++++- .../src/main/resources/configuration.txt | 4 ++++ .../src/main/resources/configuration.txt | 4 ++++ .../src/main/resources/configuration.txt | 4 ++++ .../src/main/resources/configuration.txt | 4 ++++ .../src/main/resources/configuration.txt | 4 ++++ forge-1.18/src/main/resources/configuration.txt | 4 ++++ spigot/src/main/resources/configuration.txt | 4 ++++ spigot/src/main/resources/plugin.yml | 9 +++++++++ 14 files changed, 76 insertions(+), 6 deletions(-) diff --git a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java index 16f95a37..ef25f18c 100644 --- a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java +++ b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java @@ -131,6 +131,7 @@ public class DynmapCore implements DynmapCommonAPI { private int config_hashcode; /* Used to signal need to reload web configuration (world changes, config update, etc) */ private int fullrenderplayerlimit; /* Number of online players that will cause fullrender processing to pause */ private int updateplayerlimit; /* Number of online players that will cause update processing to pause */ + private String publicURL; // If set, public HRL for accessing dynmap (declared by administrator) private boolean didfullpause; private boolean didupdatepause; private Map> ids_by_ip = new HashMap>(); @@ -557,6 +558,8 @@ public class DynmapCore implements DynmapCommonAPI { if (migrate_chunks) Log.info("EXPERIMENTAL: chunk migration enabled"); + publicURL = configuration.getString("publicURL", ""); + /* Load preupdate/postupdate commands */ ImageIOManager.preUpdateCommand = configuration.getString("custom-commands/image-updates/preupdatecommand", ""); ImageIOManager.postUpdateCommand = configuration.getString("custom-commands/image-updates/postupdatecommand", ""); @@ -1210,6 +1213,7 @@ public class DynmapCore implements DynmapCommonAPI { "del-id-for-ip", "webregister", "dumpmemory", + "url", "help"})); private static class CommandInfo { @@ -1277,6 +1281,7 @@ public class DynmapCore implements DynmapCommonAPI { new CommandInfo("dynmap", "webregister", "", "Start registration process for creating web login account for player "), new CommandInfo("dynmap", "version", "Return version information"), new CommandInfo("dynmap", "dumpmemory", "Return mempry use information"), + new CommandInfo("dynmap", "url", "Return confgured URL for Dynmap web"), new CommandInfo("dmarker", "", "Manipulate map markers."), new CommandInfo("dmarker", "add", "