From abbeb0a2129b793715e944f256ff92761a855d1a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 10 Aug 2011 05:25:45 +0100 Subject: Added method to list users fixed time. --- .../com/earth2me/essentials/commands/Commandptime.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java index f94a7cfff..eb0f51c2f 100755 --- a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java @@ -6,6 +6,7 @@ import org.bukkit.command.CommandSender; import com.earth2me.essentials.User; import java.util.Collection; import java.util.Comparator; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.TreeSet; @@ -22,6 +23,14 @@ public class Commandptime extends EssentialsCommand public static final ChatColor colorLogo = ChatColor.GREEN; public static final ChatColor colorHighlight1 = ChatColor.AQUA; public static final ChatColor colorBad = ChatColor.RED; + + public static final Set getAliases = new HashSet(); + static { + getAliases.add("get"); + getAliases.add("list"); + getAliases.add("show"); + getAliases.add("display"); + } public Commandptime() { @@ -56,7 +65,12 @@ public class Commandptime extends EssentialsCommand Long ticks; // Parse the target time int ticks from args[0] String timeParam = args[0]; - if (DescParseTickFormat.meansReset(timeParam)) + if (getAliases.contains(timeParam)) + { + getUsersTime(sender, users); + return; + } + else if (DescParseTickFormat.meansReset(timeParam)) { ticks = null; } -- cgit v1.2.3