From a1cdfa19b0f0a3b2cfdb583fa941fbf5106b5f71 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 24 Apr 2014 10:24:35 +0100 Subject: Fix time command exit statuses. --- Essentials/src/com/earth2me/essentials/commands/Commandtime.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java index 4768a3089..2d456073a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java @@ -56,7 +56,7 @@ public class Commandtime extends EssentialsCommand else { getWorldsTime(sender, worlds); - return; + throw new NoChargeException(); } } else @@ -67,8 +67,7 @@ public class Commandtime extends EssentialsCommand final User user = ess.getUser(sender.getPlayer()); if (user != null && !user.isAuthorized("essentials.time.set")) { - user.sendMessage(tl("timeSetPermission")); - return; + throw new Exception(tl("timeSetPermission")); } // Parse the target time int ticks from args[0] @@ -185,4 +184,4 @@ class WorldNameComparator implements Comparator { return a.getName().compareTo(b.getName()); } -} \ No newline at end of file +} -- cgit v1.2.3