mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Added support for Towny Advanced 0.75
This commit is contained in:
parent
069d4c0ce5
commit
a3573c7a64
@ -124,6 +124,21 @@ public class TownyConfigHandler {
|
||||
n = n.substring(idx+1); /* Process remainder as coordinate */
|
||||
}
|
||||
if(!worldmatch) continue;
|
||||
|
||||
java.util.regex.Matcher towny075Match = towny075Pattern.matcher(n);
|
||||
if (towny075Match.matches()) {
|
||||
// Towny Advanced >= 0.75
|
||||
try {
|
||||
//int plotType = Integer.valueOf(towny075Match.group(1));
|
||||
int[] vv = new int[] { Integer.valueOf(towny075Match.group(2)), Integer.valueOf(towny075Match.group(3)) };
|
||||
blks.setFlag(vv[0], vv[1], true);
|
||||
nodevals.add(vv);
|
||||
} catch(NumberFormatException nfx) {
|
||||
Log.severe("Error parsing block list in Towny - " + townfile.getPath());
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
// Towny Advanced < 0.75
|
||||
String[] v = n.split(",");
|
||||
if(v.length == 2) {
|
||||
try {
|
||||
@ -134,6 +149,10 @@ public class TownyConfigHandler {
|
||||
Log.severe("Error parsing block list in Towny - " + townfile.getPath());
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
Log.severe("Invalid block list format in Towny - " + townfile.getPath());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* If nothing in this world, skip */
|
||||
|
Loading…
Reference in New Issue
Block a user