Set giveDefault to true when running the 'clear' command

This commit is contained in:
Luck 2019-12-14 17:22:48 +00:00
parent 7474842b45
commit 5eb8a262be
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public class MetaClear extends SharedSubCommand {
return CommandResult.NO_PERMISSION;
}
NodeType type = null;
NodeType<?> type = null;
if (!args.isEmpty()) {
String typeId = args.get(0).toLowerCase();
if (typeId.equals("any") || typeId.equals("all") || typeId.equals("*")) {

View File

@ -72,9 +72,9 @@ public class HolderClear<T extends PermissionHolder> extends SubCommand<T> {
}
if (context.isEmpty()) {
holder.clearNodes(DataType.NORMAL, null, false);
holder.clearNodes(DataType.NORMAL, null, true);
} else {
holder.clearNodes(DataType.NORMAL, context, false);
holder.clearNodes(DataType.NORMAL, context, true);
}
int changed = before - holder.normalData().immutable().size();