mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
refactor: add more edithome/warp perms
This commit is contained in:
4 files changed
+50
-45
No files matched your search
@@ -30,7 +30,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.FormatStyle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -40,7 +39,6 @@ public class EditWarpCommand extends SavedPositionCommand<Warp> {
|
||||
public EditWarpCommand(@NotNull HuskHomes plugin) {
|
||||
super("editwarp", List.of(), Warp.class, List.of("rename", "description", "relocate"), plugin);
|
||||
setOperatorCommand(true);
|
||||
addAdditionalPermissions(arguments.stream().collect(HashMap::new, (m, e) -> m.put(e, false), HashMap::putAll));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,10 +48,7 @@ public class EditWarpCommand extends SavedPositionCommand<Warp> {
|
||||
getWarpEditorWindow(warp).forEach(executor::sendMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!arguments.contains(operation.get().toLowerCase())) {
|
||||
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
||||
.ifPresent(executor::sendMessage);
|
||||
if (isInvalidOperation(operation.get(), executor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user