From 268eaf5e7a5e828407a4aafef16cc8795b2a68fb Mon Sep 17 00:00:00 2001 From: MiniDay <372403923@qq.com> Date: Fri, 9 Aug 2024 05:21:10 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/plugin/currency/command/CurrencyCreateCommand.java | 4 ++-- .../mc/plugin/currency/command/CurrencyDeleteCommand.java | 2 +- .../mc/plugin/currency/command/CurrencyGiveCommand.java | 2 +- .../mc/plugin/currency/command/CurrencySeeCommand.java | 2 +- .../mc/plugin/currency/command/CurrencySetCommand.java | 2 +- .../mc/plugin/currency/command/CurrencyTakeCommand.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyCreateCommand.java b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyCreateCommand.java index 18a0dee..de0f0f1 100644 --- a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyCreateCommand.java +++ b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyCreateCommand.java @@ -43,8 +43,8 @@ public class CurrencyCreateCommand extends ChildCommand { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { - if (args.length < 2) { - ParentCurrencyCommand.INSTANCE.sendHelp(sender); + if (args.length < 1) { + sender.sendMessage(ParentCurrencyCommand.INSTANCE.getUsage() + " " + getUsage()); return true; } if (CurrencyAPI.getCurrencyType(args[0]) != null) { diff --git a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyDeleteCommand.java b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyDeleteCommand.java index 5fa10e0..d296d51 100644 --- a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyDeleteCommand.java +++ b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyDeleteCommand.java @@ -44,7 +44,7 @@ public class CurrencyDeleteCommand extends ChildCommand { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (args.length < 1) { - ParentCurrencyCommand.INSTANCE.sendHelp(sender); + sender.sendMessage(ParentCurrencyCommand.INSTANCE.getUsage() + " " + getUsage()); return true; } CurrencyType type = CurrencyDataManager.getCurrencyType(args[0]); diff --git a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyGiveCommand.java b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyGiveCommand.java index dd0c375..88ccd29 100644 --- a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyGiveCommand.java +++ b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyGiveCommand.java @@ -45,7 +45,7 @@ public class CurrencyGiveCommand extends ChildCommand { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (args.length < 3) { - ParentCurrencyCommand.INSTANCE.sendHelp(sender); + sender.sendMessage(ParentCurrencyCommand.INSTANCE.getUsage() + " " + getUsage()); return true; } BallPlayerInfo playerInfo = BallAPI.getInstance().getPlayerInfo(args[0]); diff --git a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySeeCommand.java b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySeeCommand.java index 61cbd15..7448e3a 100644 --- a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySeeCommand.java +++ b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySeeCommand.java @@ -47,7 +47,7 @@ public class CurrencySeeCommand extends ChildCommand { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (args.length < 1) { - ParentCurrencyCommand.INSTANCE.sendHelp(sender); + sender.sendMessage(ParentCurrencyCommand.INSTANCE.getUsage() + " " + getUsage()); return true; } BallPlayerInfo playerInfo = BallAPI.getInstance().getPlayerInfo(args[0]); diff --git a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySetCommand.java b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySetCommand.java index d4a0f26..06065b0 100644 --- a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySetCommand.java +++ b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencySetCommand.java @@ -45,7 +45,7 @@ public class CurrencySetCommand extends ChildCommand { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (args.length < 3) { - ParentCurrencyCommand.INSTANCE.sendHelp(sender); + sender.sendMessage(ParentCurrencyCommand.INSTANCE.getUsage() + " " + getUsage()); return true; } BallPlayerInfo playerInfo = BallAPI.getInstance().getPlayerInfo(args[0]); diff --git a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyTakeCommand.java b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyTakeCommand.java index 01bf731..a545ec9 100644 --- a/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyTakeCommand.java +++ b/src/main/java/cn/hamster3/mc/plugin/currency/command/CurrencyTakeCommand.java @@ -45,7 +45,7 @@ public class CurrencyTakeCommand extends ChildCommand { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (args.length < 3) { - ParentCurrencyCommand.INSTANCE.sendHelp(sender); + sender.sendMessage(ParentCurrencyCommand.INSTANCE.getUsage() + " " + getUsage()); return true; } BallPlayerInfo playerInfo = BallAPI.getInstance().getPlayerInfo(args[0]);