Skip to content

Commit

Permalink
Tweak how pipe debug commands are registered
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Nov 30, 2021
1 parent 3f66bf0 commit 302cd24
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ public class MIPipesCommands {
// @formatter:off
public static void init() {
CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> {
if (!MIConfig.getConfig().enableDebugCommands) {
return;
}

dispatcher.register(literal("mi")
.requires(source -> source.hasPermissionLevel(4) && MIConfig.getConfig().enableDebugCommands)
.requires(source -> source.hasPermissionLevel(4))
.then(literal("pipes")
.then(argument("pos", blockPos())
.then(literal("clear")
Expand Down

0 comments on commit 302cd24

Please sign in to comment.