mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
New API methods, refactor position object to use static creators
This commit is contained in:
1 parent
42adc13425
commit
6b8c515b61
42 files changed
+587
-232
No files matched your search
@@ -67,7 +67,7 @@ public class EditWarpCommand extends SavedPositionCommand<Warp> {
|
||||
}
|
||||
|
||||
private void setWarpDescription(@NotNull CommandUser executor, @NotNull Warp warp, @NotNull String[] args) {
|
||||
final Optional<String> optionalDescription = parseGreedyString(args, 1);
|
||||
final Optional<String> optionalDescription = parseGreedyArguments(args);
|
||||
if (optionalDescription.isEmpty()) {
|
||||
plugin.getLocales().getLocale("error_invalid_syntax",
|
||||
"/editwarp " + warp.getName() + " description <text>")
|
||||
@@ -99,7 +99,7 @@ public class EditWarpCommand extends SavedPositionCommand<Warp> {
|
||||
warp.update(user.getPosition());
|
||||
plugin.fireEvent(plugin.getWarpEditEvent(warp, executor), (event) -> {
|
||||
try {
|
||||
plugin.getManager().warps().relocateWarp(warp, warp);
|
||||
plugin.getManager().warps().setWarpPosition(warp, warp);
|
||||
} catch (ValidationException e) {
|
||||
e.dispatchWarpError(executor, plugin, warp.getName());
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user