mirror of
https://github.com/taoneill/war.git
synced 2025-01-05 07:17:34 +01:00
Merge branch 'master' of https://github.com/taoneill/war
This commit is contained in:
commit
0c9ed4b238
@ -303,6 +303,13 @@ public class WarzoneTxtMapper {
|
||||
int yaw = Integer.parseInt(teamStrSplit[4]);
|
||||
teamLocation.setYaw(yaw);
|
||||
}
|
||||
File original = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + name + "/volume-" + teamStrSplit[0] + ".dat");
|
||||
File modified = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + name + "/volume-" + teamStrSplit[0] + "0.dat");
|
||||
try {
|
||||
original.renameTo(modified);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
Team team = new Team(teamStrSplit[0], TeamKind.teamKindFromString(teamStrSplit[0]), Arrays.asList(teamLocation), warzone);
|
||||
team.setRemainingLives(warzone.getTeamDefaultConfig().resolveInt(TeamConfig.LIFEPOOL));
|
||||
warzone.getTeams().add(team);
|
||||
@ -356,7 +363,7 @@ public class WarzoneTxtMapper {
|
||||
for (Team team : warzone.getTeams()) {
|
||||
for (Location spawnLocation : team.getTeamSpawns()) {
|
||||
try {
|
||||
team.setSpawnVolume(spawnLocation, VolumeMapper.loadVolume(team.getName(), warzone.getName(), world));
|
||||
team.setSpawnVolume(spawnLocation, VolumeMapper.loadVolume(team.getName() + "0", warzone.getName(), world));
|
||||
} catch (SQLException e) {
|
||||
War.war.getLogger().log(Level.WARNING, "Failed to load some ambiguous old volume", e);
|
||||
}
|
||||
|
@ -206,10 +206,15 @@ public class WarzoneYmlMapper {
|
||||
teamSpawns.add(teamLocation);
|
||||
File original = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + name + "/volume-" + teamName + ".dat");
|
||||
File modified = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + name + "/volume-" + teamName + teamSpawns.indexOf(teamLocation) + ".dat");
|
||||
File originalSql = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + name + "/volume-" + teamName + ".sl3");
|
||||
File modifiedSql = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + name + "/volume-" + teamName + teamSpawns.indexOf(teamLocation) + ".sl3");
|
||||
try {
|
||||
original.renameTo(modified);
|
||||
} catch (Exception e) {
|
||||
// Will be logged later
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
try {
|
||||
originalSql.renameTo(modifiedSql);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
if (warzoneRootSection.contains(teamInfoPrefix + "spawns")) {
|
||||
|
Loading…
Reference in New Issue
Block a user