Skip to content

Commit

Permalink
Merge pull request #3988 from webbukkit/v3.0
Browse files Browse the repository at this point in the history
v3.6 release
  • Loading branch information
mikeprimm authored Jul 8, 2023
2 parents ab8039b + cee25bc commit f7d0928
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DynmapCore/src/main/java/org/dynmap/DynmapCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ public boolean matches(String c) {
new CommandInfo("dmap", "mapadd", "<world>:<map> <attrib>:<value> <attrib>:<value>", "Create map for world <world> with name <map> using provided attributes."),
new CommandInfo("dmap", "mapset", "<world>:<map> <attrib>:<value> <attrib>:<value>", "Update map <map> of world <world> with new attribute values."),
new CommandInfo("dmap", "worldreset", "<world>", "Reset world <world> to default template for world type"),
new CommandInfo("dmap", "worldreset", "<world> <templatename>", "Reset world <world> to temaplte <templatename>."),
new CommandInfo("dmap", "worldreset", "<world> <templatename>", "Reset world <world> to template <templatename>."),
new CommandInfo("dmap", "worldgetlimits", "<world>", "List visibity and hidden limits for world"),
new CommandInfo("dmap", "worldaddlimit", "<world> corner1:<x>/<z> corner2:<x>/<z>", "Add rectangular visibilty limit"),
new CommandInfo("dmap", "worldaddlimit", "<world> type:round center:<x>/<z> radius:<radius>", "Add round visibilty limit"),
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ allprojects {
apply plugin: 'java'

group = 'us.dynmap'
version = '3.6-beta-2'
version = '3.6'

}

Expand Down
2 changes: 1 addition & 1 deletion oldbuilds/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ allprojects {
apply plugin: 'java'

group = 'us.dynmap'
version = '3.6-beta-2'
version = '3.6'

}

Expand Down
21 changes: 16 additions & 5 deletions spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ public DynmapPlugin() {
}
}

private boolean banBrokenMsg = false;
/**
* Server access abstraction class
*/
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -464,7 +475,7 @@ public DynmapPlayer getOfflinePlayer(String name) {
@Override
public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
OfflinePlayer p = getServer().getOfflinePlayer(player);
if(p.isBanned())
if (isBanned(p))
return new HashSet<String>();
Set<String> rslt = permissions.hasOfflinePermissions(player, perms);
if (rslt == null) {
Expand All @@ -478,7 +489,7 @@ public Set<String> checkPlayerPermissions(String player, Set<String> 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;
Expand Down

0 comments on commit f7d0928

Please sign in to comment.