From f91613202897a3d011e537dfd982b8cbcf645d09 Mon Sep 17 00:00:00 2001 From: xDec0de_ Date: Fri, 1 Nov 2024 22:22:46 +0100 Subject: [PATCH] MCCommand#hasAccess now defaults to true Started making commands with the new system. It was pretty annoying to override the method on every subcommand :/ --- .../src/main/java/net/codersky/mcutils/cmd/MCCommand.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shared/src/main/java/net/codersky/mcutils/cmd/MCCommand.java b/shared/src/main/java/net/codersky/mcutils/cmd/MCCommand.java index d112fb9..81fced2 100644 --- a/shared/src/main/java/net/codersky/mcutils/cmd/MCCommand.java +++ b/shared/src/main/java/net/codersky/mcutils/cmd/MCCommand.java @@ -53,11 +53,13 @@ default P getPlugin() { @NotNull List onTab(@NotNull S sender, @NotNull String[] args); - boolean hasAccess(@NotNull S sender, boolean message); - @NotNull MCCommand inject(@NotNull MCCommand... commands); + default boolean hasAccess(@NotNull S sender, boolean message) { + return true; + } + /** * Returns whether this {@link MCCommand} removes * event patterns