From 7c3f48589d8f9b0f90c54e734a4db35f494aa551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E5=82=91?= Date: Fri, 13 Jan 2023 20:11:04 +0800 Subject: [PATCH] Add default reply in commands --- .../github/jie65535/openchat/commands/ChatPlayerCommands.java | 2 ++ .../github/jie65535/openchat/commands/ChatServerCommands.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/java/com/github/jie65535/openchat/commands/ChatPlayerCommands.java b/src/main/java/com/github/jie65535/openchat/commands/ChatPlayerCommands.java index ca09524..48b6fe5 100644 --- a/src/main/java/com/github/jie65535/openchat/commands/ChatPlayerCommands.java +++ b/src/main/java/com/github/jie65535/openchat/commands/ChatPlayerCommands.java @@ -43,6 +43,8 @@ public class ChatPlayerCommands implements CommandHandler { set.add(targetPlayer.getUid()); OpenChatPlugin.getInstance().saveData(); CommandHandler.sendMessage(sender, "OK"); + } else { + sendUsageMessage(sender); } } } diff --git a/src/main/java/com/github/jie65535/openchat/commands/ChatServerCommands.java b/src/main/java/com/github/jie65535/openchat/commands/ChatServerCommands.java index 95827de..bf20ae4 100644 --- a/src/main/java/com/github/jie65535/openchat/commands/ChatServerCommands.java +++ b/src/main/java/com/github/jie65535/openchat/commands/ChatServerCommands.java @@ -98,6 +98,7 @@ public class ChatServerCommands implements CommandHandler { plugin.loadConfig(); CommandHandler.sendMessage(sender, "OK"); } + default -> sendUsageMessage(sender); } } }