From 78cc2dd1a332fc99cd2fcdb4d0e9317611320aa1 Mon Sep 17 00:00:00 2001 From: Paldiu Date: Fri, 4 Mar 2022 17:02:16 -0600 Subject: [PATCH] Removed unnecessary allowConsole check --- src/main/java/io/github/simplexdevelopment/cl/CommandBase.java | 2 +- src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java | 2 +- .../io/github/simplexdevelopment/cl/impl/ExampleCommand.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/simplexdevelopment/cl/CommandBase.java b/src/main/java/io/github/simplexdevelopment/cl/CommandBase.java index c383a71..16804d6 100644 --- a/src/main/java/io/github/simplexdevelopment/cl/CommandBase.java +++ b/src/main/java/io/github/simplexdevelopment/cl/CommandBase.java @@ -62,7 +62,7 @@ public abstract class CommandBase extends Permissible implements ICommand { sender.sendMessage(msg("This command can only be run in game.")); } - execute(sender, args, allowConsole()); + execute(sender, args); return true; } diff --git a/src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java b/src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java index 2d06427..5d24ba3 100644 --- a/src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java +++ b/src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java @@ -12,5 +12,5 @@ public interface ICommand extends CommandExecutor, TabCompleter { * @param args The additional arguments to the command, if applicable (Provided by Paper) * @param allowConsole Whether the command should be allowed anywhere, or only in game. */ - void execute(CommandSender sender, String[] args, boolean allowConsole); + void execute(CommandSender sender, String[] args); } diff --git a/src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java b/src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java index 9a6b2cb..c3ed33a 100644 --- a/src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java +++ b/src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java @@ -15,7 +15,7 @@ public final class ExampleCommand extends CommandBase { } @Override - public void execute(CommandSender sender, String[] args, boolean allowConsole) { + public void execute(CommandSender sender, String[] args) { if (subCommand("info", sender, getPermission() + ".info", args, () -> sender.sendMessage(msg("SimplexCL was created by SimplexDevelopment!", BasicColors.GOLD)))) { return; }