Skip to content

Commit

Permalink
Rename to canUse
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jul 11, 2024
1 parent 8bb8be0 commit 508f3e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/api/0469-Brigadier-based-command-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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());
+ }
+
Expand Down

0 comments on commit 508f3e6

Please sign in to comment.