Skip to content

Commit

Permalink
MCCommand#hasAccess now defaults to true
Browse files Browse the repository at this point in the history
Started making commands with the new system. It was pretty annoying to override the method on every subcommand :/
  • Loading branch information
xDec0de committed Nov 1, 2024
1 parent c1af52c commit f916132
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shared/src/main/java/net/codersky/mcutils/cmd/MCCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ default P getPlugin() {
@NotNull
List<String> onTab(@NotNull S sender, @NotNull String[] args);

boolean hasAccess(@NotNull S sender, boolean message);

@NotNull
MCCommand<P, S> inject(@NotNull MCCommand<P, S>... commands);

default boolean hasAccess(@NotNull S sender, boolean message) {
return true;
}

/**
* Returns whether this {@link MCCommand} removes
* <a href=https://mcutils.codersky.net/for-server-admins/event-patterns>event patterns</a>
Expand Down

0 comments on commit f916132

Please sign in to comment.