mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 04:05:36 +01:00
Merge pull request #2487 from BentoBoxWorld/2486_Island_spawn_does_not_stay_set_after_a_reboot
Fixes #2486 where spawn island was not being saved
This commit is contained in:
commit
28457aba52
@ -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,10 +1224,13 @@ public class IslandsManager {
|
||||
* @since 1.8.0
|
||||
*/
|
||||
public void clearSpawn(World world) {
|
||||
if (spawns.containsKey(world)) {
|
||||
spawns.get(world).setSpawn(false);
|
||||
spawns.remove(world);
|
||||
// Tell other servers
|
||||
MultiLib.notify("bentobox-setspawn", world.getUID().toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check is a player has an island and owns it in world
|
||||
|
Loading…
Reference in New Issue
Block a user