From 248e897d0c7028f68f14e6fd1b89633b93aa264c Mon Sep 17 00:00:00 2001 From: cyilin Date: Wed, 22 Jun 2016 19:35:25 +0800 Subject: [PATCH] add message for mute/unmute command. close #8 --- src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java | 6 ++++-- src/main/resources/lang/en_US.yml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java b/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java index 17b1a84..8da78d8 100644 --- a/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java +++ b/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java @@ -194,13 +194,15 @@ public static void version(CommandSender sender, Arguments args, HamsterEcoHelpe } @SubCommand(value = "mute", permission = "heh.mute") - public static void ignore(CommandSender sender, Arguments args, HamsterEcoHelper plugin) { + public static void mute(CommandSender sender, Arguments args, HamsterEcoHelper plugin) { Mute.add(asPlayer(sender)); + msg(sender,"user.info.mute"); } @SubCommand(value = "unmute", permission = "heh.mute") - public static void unignore(CommandSender sender, Arguments args, HamsterEcoHelper plugin) { + public static void unmute(CommandSender sender, Arguments args, HamsterEcoHelper plugin) { Mute.remove(asPlayer(sender)); + msg(sender,"user.info.unmute"); } public static Player asPlayer(CommandSender target) { diff --git a/src/main/resources/lang/en_US.yml b/src/main/resources/lang/en_US.yml index d91a60b..ef0c4b6 100644 --- a/src/main/resources/lang/en_US.yml +++ b/src/main/resources/lang/en_US.yml @@ -42,6 +42,8 @@ user: next_page: "Next page" command_complete: "Command Executed!" has_temporary_storage: "You have item in temporary storage. Acquire with '/heh retrieve'" + mute: "You will no longer receive this broadcast. Use '/heh unmute' to unmute" + unmute: "Unmute success." error: bad_command: "Wrong command: %s" not_int: "Not a valid integer"