diff options
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandmsg.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandmsg.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java index 42f17bed2..f14935648 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java @@ -30,8 +30,7 @@ public class Commandmsg extends EssentialsCommand User user = ess.getUser(sender); if (user.isMuted()) { - user.sendMessage(Util.i18n("voiceSilenced")); - return; + throw new Exception(Util.i18n("voiceSilenced")); } } @@ -55,8 +54,7 @@ public class Commandmsg extends EssentialsCommand if (matches.isEmpty()) { - sender.sendMessage(Util.i18n("playerNotFound")); - return; + throw new Exception(Util.i18n("playerNotFound")); } int i = 0; @@ -70,11 +68,9 @@ public class Commandmsg extends EssentialsCommand } if (i == matches.size()) { - sender.sendMessage(Util.i18n("playerNotFound")); - return; + throw new Exception(Util.i18n("playerNotFound")); } - charge(sender); for (Player p : matches) { sender.sendMessage(Util.format("msgFormat", translatedMe, p.getDisplayName(), message)); |