This commit is contained in:
Luca
2021-11-23 16:06:54 +01:00
parent 91f20ff303
commit d2e3c65882
6 changed files with 224 additions and 44 deletions

View File

@ -58,7 +58,7 @@ public class ArenaManager {
String teamAshop = section.getString(name + ".teamAshop");
String teamBshop = section.getString(name + ".teamBshop");
String teamAupgrades = section.getString(name + ".teamAupgrades");
String teamBupgrades = section.getString(name + ".teamAupgrades");
String teamBupgrades = section.getString(name + ".teamBupgrades");
CustomLocation spawnA = CustomLocation.stringToLocation(a);
CustomLocation spawnB = CustomLocation.stringToLocation(b);
@ -109,7 +109,7 @@ public class ArenaManager {
String copyTeamAshop = section.getString(copy + ".teamAshop");
String copyTeamBshop = section.getString(copy + ".teamBshop");
String copyTeamAupgrades = section.getString(copy + ".teamAupgrades");
String copyTeamBupgrades = section.getString(copy + ".teamAupgrades");
String copyTeamBupgrades = section.getString(copy + ".teamBupgrades");
CustomLocation copySpawnA = CustomLocation.stringToLocation(copyA);
CustomLocation copySpawnB = CustomLocation.stringToLocation(copyB);
@ -220,6 +220,11 @@ public class ArenaManager {
int deadZone = arena.getDeadZone();
int buildMax = arena.getBuildMax();
String teamAshop = CustomLocation.locationToString(arena.getTeamAshop());
String teamBshop = CustomLocation.locationToString(arena.getTeamBshop());
String teamAupgrades = CustomLocation.locationToString(arena.getTeamAupgrades());
String teamBupgrades = CustomLocation.locationToString(arena.getTeamBupgrades());
String root = "arenas." + name;
fileConfig.set(root + ".icon", icon);
@ -241,6 +246,11 @@ public class ArenaManager {
fileConfig.set(root + ".diamond-generators", this.fromLocations(arena.getDiamondGenerators()));
fileConfig.set(root + ".emerald-generators", this.fromLocations(arena.getEmeraldGenerators()));
fileConfig.set(root + ".teamAshop", teamAshop);
fileConfig.set(root + ".teamBshop", teamBshop);
fileConfig.set(root + ".teamAupgrades", teamAupgrades);
fileConfig.set(root + ".teamBupgrades", teamBupgrades);
fileConfig.set(root + ".enabled", arena.isEnabled());
fileConfig.set(root + ".copiedArenas", null);
@ -256,6 +266,11 @@ public class ArenaManager {
String copyTeamBmin = CustomLocation.locationToString(copiedArena.getTeamBmin());
String copyTeamBmax = CustomLocation.locationToString(copiedArena.getTeamBmax());
String copyTeamAshop = CustomLocation.locationToString(copiedArena.getTeamAshop());
String copyTeamBshop = CustomLocation.locationToString(copiedArena.getTeamBshop());
String copyTeamAupgrades = CustomLocation.locationToString(copiedArena.getTeamAupgrades());
String copyTeamBupgrades = CustomLocation.locationToString(copiedArena.getTeamBupgrades());
String copyRoot = root + ".copiedArenas." + i;
fileConfig.set(copyRoot + ".a", copyA);
@ -271,6 +286,11 @@ public class ArenaManager {
fileConfig.set(copyRoot + ".diamond-generators", this.fromLocations(copiedArena.getDiamondGenerators()));
fileConfig.set(copyRoot + ".emerald-generators", this.fromLocations(copiedArena.getEmeraldGenerators()));
fileConfig.set(copyRoot + ".teamAshop", copyTeamAshop);
fileConfig.set(copyRoot + ".teamBshop", copyTeamBshop);
fileConfig.set(copyRoot + ".teamAupgrades", copyTeamAupgrades);
fileConfig.set(copyRoot + ".teamBupgrades", copyTeamBupgrades);
i++;
}
}