mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Finish command refactoring
This commit is contained in:
1 parent
34eb2c1f54
commit
8b809b6b5b
34 files changed
+427
-589
No files matched your search
@@ -154,9 +154,9 @@ public interface HuskHomes extends TaskRunner, EventDispatcher {
|
||||
*
|
||||
* @return the {@link Position} of the spawn, or an empty {@link Optional} if it has not been set
|
||||
*/
|
||||
default Optional<? extends Position> getSpawn() {
|
||||
default Optional<Position> getSpawn() {
|
||||
return getSettings().isCrossServer() && getSettings().isGlobalSpawn()
|
||||
? getDatabase().getWarp(getSettings().getGlobalSpawnName())
|
||||
? getDatabase().getWarp(getSettings().getGlobalSpawnName()).map(warp -> (Position) warp)
|
||||
: getLocalCachedSpawn().map(spawn -> spawn.getPosition(getServerName()));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user