mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Some more compilation issues
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
if (entitySelector.getMaxResults() > 1 && this.single) {
|
||||
if (this.playersOnly) {
|
||||
reader.setCursor(0);
|
||||
@@ -129,7 +_,12 @@
|
||||
@@ -129,7 +_,13 @@
|
||||
if (context.getSource() instanceof SharedSuggestionProvider sharedSuggestionProvider) {
|
||||
StringReader stringReader = new StringReader(builder.getInput());
|
||||
stringReader.setCursor(builder.getStart());
|
||||
@@ -24,7 +24,8 @@
|
||||
+ // Paper start - Fix EntityArgument permissions
|
||||
+ final boolean permission = sharedSuggestionProvider instanceof CommandSourceStack stack
|
||||
+ ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector")
|
||||
+ : sharedSuggestionProvider.hasPermission(2);
|
||||
+ // Only CommandSourceStack implements SharedSuggestionProvider. If *somehow* anything else ends up here, try to query its permission level, otherwise yield false.
|
||||
+ : (sharedSuggestionProvider instanceof final net.minecraft.commands.PermissionSource permissionSource && permissionSource.hasPermission(2));
|
||||
+ EntitySelectorParser entitySelectorParser = new EntitySelectorParser(stringReader, permission);
|
||||
+ // Paper end - Fix EntityArgument permissions
|
||||
|
||||
|
Reference in New Issue
Block a user