Small fixups
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
@@ -122,7 +_,7 @@
|
||||
@@ -122,6 +_,11 @@
|
||||
}
|
||||
|
||||
public static <S> boolean allowSelectors(S suggestionProvider) {
|
||||
- return suggestionProvider instanceof SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2);
|
||||
+ return suggestionProvider instanceof net.minecraft.commands.CommandSourceStack stack ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") : suggestionProvider instanceof net.minecraft.commands.SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2); // Paper - Fix EntityArgument permissions
|
||||
+ // Paper start - Fix EntityArgument permissions
|
||||
+ if (suggestionProvider instanceof net.minecraft.commands.CommandSourceStack stack) {
|
||||
+ return stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector");
|
||||
+ }
|
||||
+ // Paper end - Fix EntityArgument permissions
|
||||
return suggestionProvider instanceof SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2);
|
||||
}
|
||||
|
||||
public EntitySelector getSelector() {
|
||||
@@ -198,8 +_,10 @@
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user