mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
API: Change #getRandomPosition to accept an OnlineUser as arg instead of their position
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user