Skip to content

Commit f7d0928

Browse files
authored
Merge pull request #3988 from webbukkit/v3.0
v3.6 release
2 parents ab8039b + cee25bc commit f7d0928

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

DynmapCore/src/main/java/org/dynmap/DynmapCore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ public boolean matches(String c) {
13591359
new CommandInfo("dmap", "mapadd", "<world>:<map> <attrib>:<value> <attrib>:<value>", "Create map for world <world> with name <map> using provided attributes."),
13601360
new CommandInfo("dmap", "mapset", "<world>:<map> <attrib>:<value> <attrib>:<value>", "Update map <map> of world <world> with new attribute values."),
13611361
new CommandInfo("dmap", "worldreset", "<world>", "Reset world <world> to default template for world type"),
1362-
new CommandInfo("dmap", "worldreset", "<world> <templatename>", "Reset world <world> to temaplte <templatename>."),
1362+
new CommandInfo("dmap", "worldreset", "<world> <templatename>", "Reset world <world> to template <templatename>."),
13631363
new CommandInfo("dmap", "worldgetlimits", "<world>", "List visibity and hidden limits for world"),
13641364
new CommandInfo("dmap", "worldaddlimit", "<world> corner1:<x>/<z> corner2:<x>/<z>", "Add rectangular visibilty limit"),
13651365
new CommandInfo("dmap", "worldaddlimit", "<world> type:round center:<x>/<z> radius:<radius>", "Add round visibilty limit"),

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ allprojects {
3939
apply plugin: 'java'
4040

4141
group = 'us.dynmap'
42-
version = '3.6-beta-2'
42+
version = '3.6'
4343

4444
}
4545

oldbuilds/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ allprojects {
2525
apply plugin: 'java'
2626

2727
group = 'us.dynmap'
28-
version = '3.6-beta-2'
28+
version = '3.6'
2929

3030
}
3131

spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ public DynmapPlugin() {
238238
}
239239
}
240240

241+
private boolean banBrokenMsg = false;
241242
/**
242243
* Server access abstraction class
243244
*/
@@ -315,12 +316,22 @@ public String getServerName() {
315316
}
316317
return getServer().getMotd();
317318
}
319+
private boolean isBanned(OfflinePlayer p) {
320+
try {
321+
if ((!banBrokenMsg) && (p != null) && p.isBanned()) {
322+
return true;
323+
}
324+
} catch (Exception x) {
325+
Log.severe("Server error - broken Ban API - ban check disabled - this may allow banned players to log in!!!", x);
326+
Log.severe("REPORT ERROR TO "+ Bukkit.getServer().getVersion() + " DEVELOPERS - THIS IS NOT DYNMAP ISSUE");
327+
banBrokenMsg = true;
328+
}
329+
return false;
330+
}
318331
@Override
319332
public boolean isPlayerBanned(String pid) {
320333
OfflinePlayer p = getServer().getOfflinePlayer(pid);
321-
if((p != null) && p.isBanned())
322-
return true;
323-
return false;
334+
return isBanned(p);
324335
}
325336
@Override
326337
public boolean isServerThread() {
@@ -464,7 +475,7 @@ public DynmapPlayer getOfflinePlayer(String name) {
464475
@Override
465476
public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
466477
OfflinePlayer p = getServer().getOfflinePlayer(player);
467-
if(p.isBanned())
478+
if (isBanned(p))
468479
return new HashSet<String>();
469480
Set<String> rslt = permissions.hasOfflinePermissions(player, perms);
470481
if (rslt == null) {
@@ -478,7 +489,7 @@ public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
478489
@Override
479490
public boolean checkPlayerPermission(String player, String perm) {
480491
OfflinePlayer p = getServer().getOfflinePlayer(player);
481-
if(p.isBanned())
492+
if (isBanned(p))
482493
return false;
483494
boolean rslt = permissions.hasOfflinePermission(player, perm);
484495
return rslt;

0 commit comments

Comments
 (0)