mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-09-10 04:48:07 +02:00
Send more appropriate message when no users/groups match the editor type (#1096)
This commit is contained in:
parent
fa2d9357b8
commit
7540a6eb70
@ -87,6 +87,11 @@ public class EditorCommand extends SingleCommand {
|
||||
.forEach(holders::add);
|
||||
}
|
||||
|
||||
if (holders.isEmpty()) {
|
||||
Message.EDITOR_NO_MATCH.send(sender);
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
// remove holders which the sender doesn't have perms to view
|
||||
holders.removeIf(holder -> ArgumentPermissions.checkViewPerms(plugin, sender, getPermission().get(), holder));
|
||||
|
||||
|
@ -158,6 +158,7 @@ public enum Message {
|
||||
APPLY_EDITS_DIFF_ADDED("&a+ &f{}", false),
|
||||
APPLY_EDITS_DIFF_REMOVED("&c- &f{}", false),
|
||||
|
||||
EDITOR_NO_MATCH("&cUnable to open editor. No objects matched the desired type.", true),
|
||||
EDITOR_START("&7Preparing a new editor session. Please wait...", true),
|
||||
EDITOR_UPLOAD_FAILURE("&cUnable to upload permission data to the editor.", true),
|
||||
EDITOR_URL("&aClick the link below to open the editor:", true),
|
||||
|
Loading…
Reference in New Issue
Block a user