Finalizing the fix

This commit is contained in:
Fabrizio La Rosa 2020-07-12 19:32:01 +02:00
parent e9b1a07083
commit 8f3bbfadfc

View File

@ -44,7 +44,7 @@ public class Island {
private UUID islandUUID;
private UUID ownerUUID;
private IslandLevel level;
private final IslandLevel level;
private IslandStatus status;
private int size;
private int maxMembers;
@ -242,6 +242,7 @@ public class Island {
configLoad.set("Weather.Time", mainConfigLoad.getInt("Island.Weather.Default.Time"));
configLoad.set("Weather.Weather", mainConfigLoad.getString("Island.Weather.Default.Weather").toUpperCase());
configLoad.set("Ownership.Original", ownerUUID.toString());
configLoad.set("Size", size);
for (IslandRole roleList : IslandRole.getRoles()) {
List<BasicPermission> allPermissions = plugin.getPermissionManager().getPermissions();
@ -258,7 +259,6 @@ public class Island {
status = IslandStatus.getEnum(mainConfigLoad.getString("Island.Visitor.Status"));
save();
Player onlinePlayer = Bukkit.getServer().getPlayer(ownerUUID);
@ -273,6 +273,8 @@ public class Island {
playerData.save();
}
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
if (!mainConfigLoad.getBoolean("Island.Coop.Unload")) {
File coopDataFile = new File(plugin.getDataFolder().toString() + "/coop-data",
getOwnerUUID().toString() + ".yml");