mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 14:38:53 +00:00
Reduce future join call usage
This commit is contained in:
1 parent
8a4ed7c565
commit
649d4c0600
18 files changed
+316
-291
No files matched your search
@@ -6,8 +6,6 @@ import net.william278.huskhomes.position.PositionMeta;
|
||||
import net.william278.huskhomes.util.Permission;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class SetWarpCommand extends CommandBase {
|
||||
|
||||
protected SetWarpCommand(@NotNull HuskHomes implementor) {
|
||||
@@ -17,7 +15,7 @@ public class SetWarpCommand extends CommandBase {
|
||||
@Override
|
||||
public void onExecute(@NotNull OnlineUser onlineUser, @NotNull String[] args) {
|
||||
if (args.length == 1) {
|
||||
CompletableFuture.runAsync(() -> setWarp(onlineUser, args[0]));
|
||||
setWarp(onlineUser, args[0]);
|
||||
} else {
|
||||
plugin.getLocales().getLocale("error_invalid_syntax", "/setwarp <name>")
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
|
||||
Reference in new issue
Block a user