mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Refactor and simplify RandomTeleportEngine API and logic
This commit is contained in:
1 parent
c8a0f00290
commit
6b55327e52
6 files changed
+109
-178
No files matched your search
@@ -384,7 +384,6 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes {
|
||||
@Override
|
||||
public void setRandomTeleportEngine(@NotNull RandomTeleportEngine randomTeleportEngine) {
|
||||
this.randomTeleportEngine = randomTeleportEngine;
|
||||
this.randomTeleportEngine.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -425,7 +424,7 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Optional<Location>> getSafeGroundLocation(@NotNull Location location) {
|
||||
public CompletableFuture<Optional<Location>> resolveSafeGroundLocation(@NotNull Location location) {
|
||||
final CompletableFuture<Optional<Location>> future = new CompletableFuture<>();
|
||||
Bukkit.getScheduler().runTask(getInstance(), () -> BukkitAdapter.adaptLocation(location).ifPresentOrElse(
|
||||
bukkitLocation -> {
|
||||
|
||||
Reference in new issue
Block a user