API: Change #getRandomPosition to accept an OnlineUser as arg instead of their position

This commit is contained in:
William278 committed 2022-09-06 01:00:48 +03:00
1 parent 3f8bbf96d3
commit 1c2f1134d2
3 files changed
+13 -11

No files matched your search

@@ -357,7 +357,7 @@ public abstract class BaseHuskHomesAPI {
final boolean timedTeleport,
@NotNull String... rtpArgs) {
return CompletableFuture.supplyAsync(() -> plugin.getRandomTeleportEngine()
.getRandomPosition(user.getPosition(), rtpArgs)
.getRandomPosition(user, rtpArgs)
.thenApply(position -> {
if (position.isPresent()) {
return teleportPlayer(user, position.get(), timedTeleport).join();