Finish cross-server respawning, close #123

This commit is contained in:
William committed 2022-08-23 00:27:04 +01:00
1 parent f0d9807ee4
commit 713bf2ea42
12 files changed
+70 -51

No files matched your search

@@ -26,7 +26,7 @@ public class SpawnCommand extends CommandBase {
CompletableFuture.runAsync(() -> {
final Optional<? extends Position> position = (plugin.getSettings().crossServer && plugin.getSettings().globalSpawn
? plugin.getDatabase().getWarp(plugin.getSettings().globalSpawnName).join()
: plugin.getSpawn().flatMap(spawn -> spawn.getLocation(plugin.getServer(onlineUser).join())));
: plugin.getServerSpawn().flatMap(spawn -> spawn.getLocation(plugin.getServer(onlineUser).join())));
if (position.isEmpty()) {
plugin.getLocales().getLocale("error_spawn_not_set").ifPresent(onlineUser::sendMessage);
return;