Fixup plan expansion and RTP engine

This commit is contained in:
William278 committed 2023-03-20 15:10:21 +00:00
1 parent 8b809b6b5b
commit 547870e6c1
7 files changed
+142 -194

No files matched your search

@@ -44,12 +44,7 @@ public abstract class RandomTeleportEngine {
*/
protected final Position getOrigin(@NotNull World world) {
return plugin.getLocalCachedSpawn()
.flatMap(spawn -> {
if (!spawn.worldUuid.equals(world.getUuid().toString())) {
return Optional.empty();
}
return spawn.getPosition(plugin.getServerName());
})
.map(s -> s.getPosition(plugin.getServerName()))
.orElse(new Position(0d, 128d, 0d, 0f, 0f,
world, plugin.getServerName()));
}