Skip to content

Commit

Permalink
fix: the first spawn not being the main one
Browse files Browse the repository at this point in the history
Signed-off-by: Thatsmusic99 <25277367+thatsmusic99@users.noreply.github.com>
  • Loading branch information
Thatsmusic99 committed Aug 17, 2023
1 parent f746f91 commit 48d0af7
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -178,6 +178,12 @@ public static boolean isWarpSet(@NotNull String name) {
.orElse(null));
NamedLocationManager.get().registerSpawn(spawn);

// If there is no main spawn yet, make it this one too
if (NamedLocationManager.get().getMainSpawn() == null) {
Bukkit.getScheduler().runTask(CoreClass.getInstance(),
() -> AdvancedTeleportAPI.setMainSpawn(spawn, sender));
}

// Add it to the database.
return SpawnSQLManager.get()
.addSpawn(spawn)
Expand Down

0 comments on commit 48d0af7

Please sign in to comment.