From e476f3374399cf50bf23beaaf4b7e5581d775fec Mon Sep 17 00:00:00 2001 From: tastybento Date: Thu, 29 Aug 2024 17:27:50 -0700 Subject: [PATCH] Fixes #2486 where spawn island was not being saved --- .../bentobox/bentobox/managers/IslandsManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java index 7d7364365..5b11937f0 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java @@ -1209,6 +1209,7 @@ public class IslandsManager { */ public void setSpawn(@NonNull Island spawn) { if (spawn.getWorld() != null) { + spawn.setSpawn(true); spawns.put(Util.getWorld(spawn.getWorld()), spawn); // Tell other servers MultiLib.notify("bentobox-setspawn", spawn.getWorld().getUID().toString() + "," + spawn.getUniqueId()); @@ -1223,9 +1224,12 @@ public class IslandsManager { * @since 1.8.0 */ public void clearSpawn(World world) { - spawns.remove(world); - // Tell other servers - MultiLib.notify("bentobox-setspawn", world.getUID().toString()); + if (spawns.containsKey(world)) { + spawns.get(world).setSpawn(false); + spawns.remove(world); + // Tell other servers + MultiLib.notify("bentobox-setspawn", world.getUID().toString()); + } } /**