diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-08-10 05:25:45 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-08-10 05:25:45 +0100 |
commit | abbeb0a2129b793715e944f256ff92761a855d1a (patch) | |
tree | 8638876f7e349c91cff77305694ecaefc628c03a | |
parent | d9d781a33a9f3902dde19e43e29d3711ffc40e0b (diff) | |
download | Essentials-abbeb0a2129b793715e944f256ff92761a855d1a.tar Essentials-abbeb0a2129b793715e944f256ff92761a855d1a.tar.gz Essentials-abbeb0a2129b793715e944f256ff92761a855d1a.tar.lz Essentials-abbeb0a2129b793715e944f256ff92761a855d1a.tar.xz Essentials-abbeb0a2129b793715e944f256ff92761a855d1a.zip |
Added method to list users fixed time.
-rwxr-xr-x | Essentials/src/com/earth2me/essentials/commands/Commandptime.java | 16 |
1 files changed, 15 insertions, 1 deletions
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<String> getAliases = new HashSet<String>(); + 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; } |