mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
home, sethome and homelist implementation
This commit is contained in:
1 parent
5e793e8ec7
commit
0e33fb8014
18 files changed
+349
-138
No files matched your search
@@ -61,8 +61,10 @@ public class Cache {
|
||||
*/
|
||||
public void initialize(@NotNull Database database) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
database.getPublicHomes().thenAccept(publicHomeList -> publicHomeList.forEach(home ->
|
||||
this.publicHomes.computeIfAbsent(home.owner.username, key -> new ArrayList<>()).add(home.meta.name)));
|
||||
database.getPublicHomes().thenAccept(publicHomeList -> publicHomeList.forEach(home -> {
|
||||
this.publicHomes.putIfAbsent(home.owner.username, new ArrayList<>());
|
||||
this.publicHomes.get(home.owner.username).add(home.meta.name);
|
||||
}));
|
||||
database.getWarps().thenAccept(warpsList -> warpsList.forEach(warp ->
|
||||
this.warps.add(warp.meta.name)));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user