From 8f3bbfadfca5c1943f70b479351a50e500c9c26d Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Sun, 12 Jul 2020 19:32:01 +0200 Subject: [PATCH] Finalizing the fix --- src/main/java/com/songoda/skyblock/island/Island.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/skyblock/island/Island.java b/src/main/java/com/songoda/skyblock/island/Island.java index 69eda110..cd8107cd 100644 --- a/src/main/java/com/songoda/skyblock/island/Island.java +++ b/src/main/java/com/songoda/skyblock/island/Island.java @@ -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 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); @@ -272,7 +272,9 @@ public class Island { playerData.setMemberSince(new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date())); 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");