mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Refactor player location and server name fetching, prune unused locales
This commit is contained in:
1 parent
571f35429d
commit
7e3dab918f
23 files changed
+151
-200
No files matched your search
@@ -114,8 +114,8 @@ public class EditWarpCommand extends CommandBase implements TabCompletable, Cons
|
||||
default -> Optional.of(new MineDown(""));
|
||||
}).ifPresent(editor::sendMessage));
|
||||
}
|
||||
case "relocate" -> editor.getPosition().thenAccept(position ->
|
||||
plugin.getSavedPositionManager().updateWarpPosition(warp, position).thenRun(() -> {
|
||||
case "relocate" ->
|
||||
plugin.getSavedPositionManager().updateWarpPosition(warp, editor.getPosition()).thenRun(() -> {
|
||||
editor.sendMessage(plugin.getLocales().getLocale("edit_warp_update_location",
|
||||
warp.meta.name).orElse(new MineDown("")));
|
||||
|
||||
@@ -124,7 +124,7 @@ public class EditWarpCommand extends CommandBase implements TabCompletable, Cons
|
||||
getWarpEditorWindow(warp, false, editor.hasPermission(Permission.COMMAND_WARP.node))
|
||||
.forEach(editor::sendMessage);
|
||||
}
|
||||
}));
|
||||
});
|
||||
default -> plugin.getLocales().getLocale("error_invalid_syntax",
|
||||
"/editwarp <name> [" + String.join("|", EDIT_WARP_COMPLETIONS) + "] [args]")
|
||||
.ifPresent(editor::sendMessage);
|
||||
|
||||
Reference in new issue
Block a user