Compatiblity with DungeonsXL

This commit is contained in:
Sn0wStorm
2013-06-05 19:44:30 +02:00
parent 84e37ec676
commit edf8c7a840
4 changed files with 57 additions and 13 deletions
+10 -2
View File
@@ -155,8 +155,16 @@ public class Barrel {
if (!barrels.isEmpty()) {
int id = 0;
for (Barrel barrel : barrels) {
// barrels are sorted in worldUUID.randomId
String prefix = barrel.spigot.getWorld().getUID().toString() + "." + id;
String worldName = barrel.spigot.getWorld().getName();
String prefix = null;
if (worldName.startsWith("DXL_")) {
prefix = P.p.getDxlName(worldName) + "." + id;
} else {
prefix = barrel.spigot.getWorld().getUID().toString() + "." + id;
}
// block: x/y/z
config.set(prefix + ".spigot", barrel.spigot.getX() + "/" + barrel.spigot.getY() + "/" + barrel.spigot.getZ());