mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-30 22:53:27 +01:00
Fix verbose system
This commit is contained in:
parent
2dd0858960
commit
981d745b74
@ -35,7 +35,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class VerboseCommand extends SingleMainCommand {
|
||||
public VerboseCommand() {
|
||||
super("Verbose", "/%s verbose <true|false> [filters]", 1, Permission.VERBOSE);
|
||||
super("Verbose", "/%s verbose <true|false> [filters...]", 1, Permission.VERBOSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,7 +58,7 @@ public class VerboseCommand extends SingleMainCommand {
|
||||
|
||||
List<String> filters = new ArrayList<>();
|
||||
if (args.size() != 1) {
|
||||
filters.addAll(args.subList(1, args.size() + 1));
|
||||
filters.addAll(args.subList(1, args.size()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,22 +39,18 @@ public class DebugHandler {
|
||||
private final Map<Reciever, List<String>> listeners = new ConcurrentHashMap<>();
|
||||
|
||||
public void printOutput(String checked, String node, Tristate value) {
|
||||
all:
|
||||
for (Map.Entry<Reciever, List<String>> e : listeners.entrySet()) {
|
||||
List<String> filters = e.getValue();
|
||||
|
||||
find:
|
||||
if (!filters.isEmpty()) {
|
||||
for (String filter : filters) {
|
||||
for (String filter : e.getValue()) {
|
||||
if (node.toLowerCase().startsWith(filter.toLowerCase())) {
|
||||
break find;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (checked.equalsIgnoreCase(filter)) {
|
||||
break find;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
continue;
|
||||
continue all;
|
||||
}
|
||||
|
||||
Message.LOG.send(e.getKey().getSender(), "&7Checking &a" + checked + "&7 for: &a" + node + " &f(&7" + value.toString() + "&f)");
|
||||
|
@ -46,7 +46,7 @@ use-uninherit-command: "Use the 'parent remove' command instead of specifying th
|
||||
|
||||
|
||||
verbose-on: "&bVerbose checking output set to &aTRUE &bfor all permissions."
|
||||
verbose-on_query: "&bVerbose checking output set to &aTRUE &bfor permissions starting with &f\"{0}\"&b."
|
||||
verbose-on_query: "&bVerbose checking output set to &aTRUE &bfor permissions matching the following filters: &f{0}"
|
||||
verbose-off: "&bVerbose checking output set to &cFALSE&b."
|
||||
|
||||
create-success: "&b{0}&a was successfully created."
|
||||
|
Loading…
Reference in New Issue
Block a user