mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 12:15:12 +01:00
Fixes #2486 where spawn island was not being saved
This commit is contained in:
parent
c2737f00e1
commit
e476f33743
@ -1209,6 +1209,7 @@ public class IslandsManager {
|
|||||||
*/
|
*/
|
||||||
public void setSpawn(@NonNull Island spawn) {
|
public void setSpawn(@NonNull Island spawn) {
|
||||||
if (spawn.getWorld() != null) {
|
if (spawn.getWorld() != null) {
|
||||||
|
spawn.setSpawn(true);
|
||||||
spawns.put(Util.getWorld(spawn.getWorld()), spawn);
|
spawns.put(Util.getWorld(spawn.getWorld()), spawn);
|
||||||
// Tell other servers
|
// Tell other servers
|
||||||
MultiLib.notify("bentobox-setspawn", spawn.getWorld().getUID().toString() + "," + spawn.getUniqueId());
|
MultiLib.notify("bentobox-setspawn", spawn.getWorld().getUID().toString() + "," + spawn.getUniqueId());
|
||||||
@ -1223,9 +1224,12 @@ public class IslandsManager {
|
|||||||
* @since 1.8.0
|
* @since 1.8.0
|
||||||
*/
|
*/
|
||||||
public void clearSpawn(World world) {
|
public void clearSpawn(World world) {
|
||||||
spawns.remove(world);
|
if (spawns.containsKey(world)) {
|
||||||
// Tell other servers
|
spawns.get(world).setSpawn(false);
|
||||||
MultiLib.notify("bentobox-setspawn", world.getUID().toString());
|
spawns.remove(world);
|
||||||
|
// Tell other servers
|
||||||
|
MultiLib.notify("bentobox-setspawn", world.getUID().toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user