From fa36d3fa384ed4f5ca937ef5fc69fcda0f762479 Mon Sep 17 00:00:00 2001 From: Lewie Date: Wed, 21 Jun 2023 00:11:29 -0400 Subject: [PATCH 1/4] Fix spelling of template --- DynmapCore/src/main/java/org/dynmap/DynmapCore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java index 9a0445a39..6bb2beb89 100644 --- a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java +++ b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java @@ -1359,7 +1359,7 @@ public boolean matches(String c) { new CommandInfo("dmap", "mapadd", ": : :", "Create map for world with name using provided attributes."), new CommandInfo("dmap", "mapset", ": : :", "Update map of world with new attribute values."), new CommandInfo("dmap", "worldreset", "", "Reset world to default template for world type"), - new CommandInfo("dmap", "worldreset", " ", "Reset world to temaplte ."), + new CommandInfo("dmap", "worldreset", " ", "Reset world to template ."), new CommandInfo("dmap", "worldgetlimits", "", "List visibity and hidden limits for world"), new CommandInfo("dmap", "worldaddlimit", " corner1:/ corner2:/", "Add rectangular visibilty limit"), new CommandInfo("dmap", "worldaddlimit", " type:round center:/ radius:", "Add round visibilty limit"), From 7f6dc1d52c0ad941c24154b13077379a5f482726 Mon Sep 17 00:00:00 2001 From: Michael Primm Date: Mon, 26 Jun 2023 22:17:42 -0500 Subject: [PATCH 2/4] Back to SNAPSHOT --- build.gradle | 2 +- oldbuilds/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 05d183263..7ff5c4223 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ allprojects { apply plugin: 'java' group = 'us.dynmap' - version = '3.6-beta-2' + version = '3.6-SNAPSHOT' } diff --git a/oldbuilds/build.gradle b/oldbuilds/build.gradle index 858161d65..d6261466b 100644 --- a/oldbuilds/build.gradle +++ b/oldbuilds/build.gradle @@ -25,7 +25,7 @@ allprojects { apply plugin: 'java' group = 'us.dynmap' - version = '3.6-beta-2' + version = '3.6-SNAPSHOT' } From 3715b114e9a0afa482c7d025819c8d225f3ebfec Mon Sep 17 00:00:00 2001 From: Michael Primm Date: Sat, 8 Jul 2023 13:19:00 -0500 Subject: [PATCH 3/4] Switch to 3.6 GA release candidate --- build.gradle | 2 +- oldbuilds/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7ff5c4223..da648fc18 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ allprojects { apply plugin: 'java' group = 'us.dynmap' - version = '3.6-SNAPSHOT' + version = '3.6' } diff --git a/oldbuilds/build.gradle b/oldbuilds/build.gradle index d6261466b..4671c20d6 100644 --- a/oldbuilds/build.gradle +++ b/oldbuilds/build.gradle @@ -25,7 +25,7 @@ allprojects { apply plugin: 'java' group = 'us.dynmap' - version = '3.6-SNAPSHOT' + version = '3.6' } From cee25bc518828baa79a00dbf68fa9505868dfa51 Mon Sep 17 00:00:00 2001 From: Michael Primm Date: Sat, 8 Jul 2023 15:11:02 -0500 Subject: [PATCH 4/4] Add workaround for PaperMC's broken Ban API --- .../java/org/dynmap/bukkit/DynmapPlugin.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java b/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java index 6fa416b1e..b2ad4e665 100644 --- a/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java +++ b/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java @@ -238,6 +238,7 @@ public DynmapPlugin() { } } + private boolean banBrokenMsg = false; /** * Server access abstraction class */ @@ -315,12 +316,22 @@ public String getServerName() { } return getServer().getMotd(); } + private boolean isBanned(OfflinePlayer p) { + try { + if ((!banBrokenMsg) && (p != null) && p.isBanned()) { + return true; + } + } catch (Exception x) { + Log.severe("Server error - broken Ban API - ban check disabled - this may allow banned players to log in!!!", x); + Log.severe("REPORT ERROR TO "+ Bukkit.getServer().getVersion() + " DEVELOPERS - THIS IS NOT DYNMAP ISSUE"); + banBrokenMsg = true; + } + return false; + } @Override public boolean isPlayerBanned(String pid) { OfflinePlayer p = getServer().getOfflinePlayer(pid); - if((p != null) && p.isBanned()) - return true; - return false; + return isBanned(p); } @Override public boolean isServerThread() { @@ -464,7 +475,7 @@ public DynmapPlayer getOfflinePlayer(String name) { @Override public Set checkPlayerPermissions(String player, Set perms) { OfflinePlayer p = getServer().getOfflinePlayer(player); - if(p.isBanned()) + if (isBanned(p)) return new HashSet(); Set rslt = permissions.hasOfflinePermissions(player, perms); if (rslt == null) { @@ -478,7 +489,7 @@ public Set checkPlayerPermissions(String player, Set perms) { @Override public boolean checkPlayerPermission(String player, String perm) { OfflinePlayer p = getServer().getOfflinePlayer(player); - if(p.isBanned()) + if (isBanned(p)) return false; boolean rslt = permissions.hasOfflinePermission(player, perm); return rslt;