mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Correct unsafe future joining
This commit is contained in:
1 parent
adac00ea47
commit
950a51c140
14 files changed
+42
-42
No files matched your search
@@ -26,7 +26,7 @@ public class PublicHomeCommand extends CommandBase implements TabCompletable, Co
|
||||
@Override
|
||||
public void onExecute(@NotNull OnlineUser onlineUser, @NotNull String[] args) {
|
||||
switch (args.length) {
|
||||
case 0 -> plugin.getDatabase().getPublicHomes().thenAccept(publicHomes -> {
|
||||
case 0 -> plugin.getDatabase().getPublicHomes().thenAcceptAsync(publicHomes -> {
|
||||
// Display the public home list if there are any public home set
|
||||
if (publicHomes.size() == 0) {
|
||||
plugin.getLocales().getLocale("error_no_public_homes_set").ifPresent(onlineUser::sendMessage);
|
||||
|
||||
Reference in new issue
Block a user