Fix errors when loading old saves.
This commit is contained in:
parent
e568d27d41
commit
11f8463766
|
@ -4,7 +4,7 @@
|
||||||
<groupId>net.seanomik</groupId>
|
<groupId>net.seanomik</groupId>
|
||||||
<artifactId>energeticstorage</artifactId>
|
<artifactId>energeticstorage</artifactId>
|
||||||
<name>EnergeticStorage</name>
|
<name>EnergeticStorage</name>
|
||||||
<version>0.7.1-SNAPSHOT</version>
|
<version>0.7.2-SNAPSHOT</version>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean package</defaultGoal>
|
<defaultGoal>clean package</defaultGoal>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>net.seanomik</groupId>
|
<groupId>net.seanomik</groupId>
|
||||||
<artifactId>energeticstorage</artifactId>
|
<artifactId>energeticstorage</artifactId>
|
||||||
<version>0.7.1-SNAPSHOT</version>
|
<version>0.7.2-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>EnergeticStorage</name>
|
<name>EnergeticStorage</name>
|
||||||
|
|
|
@ -158,7 +158,12 @@ public class PlayersFile extends YamlConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isPublic = getConfig().getBoolean(systemPath + "public");
|
boolean isPublic = getConfig().getBoolean(systemPath + "public");
|
||||||
ESSystem.SortOrder sortOrder = ESSystem.SortOrder.valueOf(getConfig().getString(systemPath + "sortOrder"));
|
ESSystem.SortOrder sortOrder;
|
||||||
|
if (getConfig().contains(systemPath + "sortOrder")) {
|
||||||
|
sortOrder = ESSystem.SortOrder.valueOf(getConfig().getString(systemPath + "sortOrder"));
|
||||||
|
} else {
|
||||||
|
sortOrder = ESSystem.SortOrder.ALPHABETICAL;
|
||||||
|
}
|
||||||
|
|
||||||
Location loc = Utils.convertStringToLocation(getConfig().getString(systemPath + "loc"));
|
Location loc = Utils.convertStringToLocation(getConfig().getString(systemPath + "loc"));
|
||||||
systems.add(new ESSystem(uuid, UUID.fromString(systemUUID), loc, drives, trustedUUIDs, isPublic, sortOrder));
|
systems.add(new ESSystem(uuid, UUID.fromString(systemUUID), loc, drives, trustedUUIDs, isPublic, sortOrder));
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class ESSystem implements Cloneable, ConfigurationSerializable {
|
||||||
private List<ESDrive> esDrives = new ArrayList<>();
|
private List<ESDrive> esDrives = new ArrayList<>();
|
||||||
private List<UUID> trustedPlayers = new ArrayList<>();
|
private List<UUID> trustedPlayers = new ArrayList<>();
|
||||||
private boolean isPublic;
|
private boolean isPublic;
|
||||||
private SortOrder sortOrder;
|
private SortOrder sortOrder = SortOrder.ALPHABETICAL;
|
||||||
|
|
||||||
public ESSystem(UUID owner, UUID uuid, Location location) {
|
public ESSystem(UUID owner, UUID uuid, Location location) {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
|
|
Loading…
Reference in New Issue