Skip to content

Commit

Permalink
Relax permissions on clear book cache
Browse files Browse the repository at this point in the history
Command just is a faster version of F3+H, and only affects the one running it, so no need for permissions checks
  • Loading branch information
KnightMiner committed Feb 13, 2024
1 parent 1f18116 commit 16d19fb
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -18,7 +18,7 @@ public class ClearBookCacheCommand {
* @param subCommand Command builder
*/
public static void register(LiteralArgumentBuilder<CommandSourceStack> subCommand) {
subCommand.requires(source -> source.hasPermission(MantleCommand.PERMISSION_GAME_COMMANDS) && source.getEntity() instanceof ServerPlayer)
subCommand.requires(source -> source.getEntity() instanceof ServerPlayer)
.then(Commands.argument("id", ResourceLocationArgument.id()).suggests(MantleCommand.REGISTERED_BOOKS)
.executes(ClearBookCacheCommand::runBook))
.executes(ClearBookCacheCommand::runAll);
Expand Down

0 comments on commit 16d19fb

Please sign in to comment.