Refactor and simplify RandomTeleportEngine API and logic

This commit is contained in:
William278 committed 2022-11-23 11:56:58 +00:00
1 parent c8a0f00290
commit 6b55327e52
6 files changed
+109 -178

No files matched your search

@@ -389,7 +389,7 @@ public abstract class BaseHuskHomesAPI {
final boolean timedTeleport,
@NotNull String... rtpArgs) {
return CompletableFuture.supplyAsync(() -> plugin.getRandomTeleportEngine()
.getRandomPosition(user, rtpArgs)
.getRandomPosition(user.getPosition().world, rtpArgs)
.thenApply(position -> {
if (position.isPresent()) {
final TeleportBuilder builder = Teleport.builder(plugin, user)