mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
More refactor work, encapsulate classes
This commit is contained in:
1 parent
3e1ec09487
commit
1cebdac9b8
51 files changed
+756
-621
No files matched your search
@@ -143,7 +143,7 @@ public abstract class BaseHuskHomesAPI {
|
||||
*/
|
||||
public final CompletableFuture<List<Home>> getUserPublicHomes(@NotNull User user) {
|
||||
return getUserHomes(user).thenApply(homes -> homes.stream()
|
||||
.filter(home -> home.isPublic)
|
||||
.filter(home -> home.isPublic())
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ public abstract class BaseHuskHomesAPI {
|
||||
final boolean timedTeleport,
|
||||
@NotNull String... rtpArgs) {
|
||||
return plugin.supplyAsync(() -> plugin.getRandomTeleportEngine()
|
||||
.getRandomPosition(user.getPosition().world, rtpArgs)
|
||||
.getRandomPosition(user.getPosition().getWorld(), rtpArgs)
|
||||
.map(position -> {
|
||||
final TeleportBuilder builder = Teleport.builder(plugin, user)
|
||||
.setTarget(position);
|
||||
|
||||
Reference in new issue
Block a user