diff --git a/patches/api/0469-Brigadier-based-command-API.patch b/patches/api/0469-Brigadier-based-command-API.patch index 0f9cf5b83ce29..a48f15f8318c0 100644 --- a/patches/api/0469-Brigadier-based-command-API.patch +++ b/patches/api/0469-Brigadier-based-command-API.patch @@ -548,11 +548,11 @@ index 0000000000000000000000000000000000000000..712db7acae2f9818a3b112f770ee7702 + * Checks whether a command sender can receive and run the root command. + * + * @param sender the command sender trying to execute the command -+ * @return whether the command sender fulfill the root command requirement ++ * @return whether the command sender fulfills the root command requirement + * @see #permission() + */ + @ApiStatus.OverrideOnly -+ default boolean requires(final @NotNull CommandSender sender) { ++ default boolean canUse(final @NotNull CommandSender sender) { + return this.permission() == null || sender.hasPermission(this.permission()); + } + diff --git a/patches/server/0975-Brigadier-based-command-API.patch b/patches/server/0975-Brigadier-based-command-API.patch index 8be83294387bb..ab14bb6a9cf2c 100644 --- a/patches/server/0975-Brigadier-based-command-API.patch +++ b/patches/server/0975-Brigadier-based-command-API.patch @@ -686,7 +686,7 @@ index 0000000000000000000000000000000000000000..1b1642f306771f029e6214a2e2ebebb6 +} diff --git a/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java b/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java new file mode 100644 -index 0000000000000000000000000000000000000000..ac83eefcea3f22b7980bf7b4f1f22a5ae18d82c1 +index 0000000000000000000000000000000000000000..a3e128bde0fa4ab0ecab4172f02288a29b9fddc7 --- /dev/null +++ b/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java @@ -0,0 +1,194 @@ @@ -860,7 +860,7 @@ index 0000000000000000000000000000000000000000..ac83eefcea3f22b7980bf7b4f1f22a5a + @Override + public @Unmodifiable Set register(final PluginMeta pluginMeta, final String label, final @Nullable String description, final Collection aliases, final BasicCommand basicCommand) { + final LiteralArgumentBuilder builder = Commands.literal(label) -+ .requires(stack -> basicCommand.requires(stack.getSender())) ++ .requires(stack -> basicCommand.canUse(stack.getSender())) + .then( + Commands.argument("args", StringArgumentType.greedyString()) + .suggests((context, suggestionsBuilder) -> {