mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Finish cross-server respawning, close #123
This commit is contained in:
1 parent
f0d9807ee4
commit
713bf2ea42
12 files changed
+70
-51
No files matched your search
@@ -34,7 +34,7 @@ public class SetSpawnCommand extends CommandBase {
|
||||
.orElse("")), position).join();
|
||||
}
|
||||
} else {
|
||||
plugin.setSpawn(position);
|
||||
plugin.setServerSpawn(position);
|
||||
}
|
||||
}).thenRun(() -> plugin.getLocales().getLocale("set_spawn_success").ifPresent(onlineUser::sendMessage));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user