Safety: Make edithome, editwarp and sethome execute asynchronously

This commit is contained in:
William278 committed 2022-09-06 14:16:44 +03:00
1 parent 300a01a2c2
commit 4fce90dbbe
3 files changed
+4 -4

No files matched your search

@@ -31,7 +31,7 @@ public class EditWarpCommand extends CommandBase implements TabCompletable {
final String editOperation = args.length >= 2 ? args[1] : null;
final String editArgs = getEditArguments(args);
plugin.getDatabase().getWarp(warpName).thenAccept(optionalWarp -> {
plugin.getDatabase().getWarp(warpName).thenAcceptAsync(optionalWarp -> {
if (optionalWarp.isEmpty()) {
plugin.getLocales().getLocale("error_warp_invalid", warpName)
.ifPresent(onlineUser::sendMessage);