summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/Help.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Help.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/Help.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Help.java b/src/main/java/net/tylermurphy/hideAndSeek/command/Help.java
new file mode 100644
index 0000000..f33717e
--- /dev/null
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Help.java
@@ -0,0 +1,32 @@
+package net.tylermurphy.hideAndSeek.command;
+
+import org.bukkit.command.CommandSender;
+
+import net.md_5.bungee.api.ChatColor;
+import net.tylermurphy.hideAndSeek.bukkit.CommandHandler;
+import net.tylermurphy.hideAndSeek.util.ICommand;
+
+public class Help implements ICommand {
+
+ public void execute(CommandSender sender, String[] args) {
+ String message = "";
+ for(ICommand command : CommandHandler.COMMAND_REGISTER.values()) {
+ message += String.format("%s/hs %s%s %s%s\n %s%s%s", ChatColor.AQUA, ChatColor.WHITE, command.getLabel().toLowerCase(), ChatColor.BLUE, command.getUsage(), ChatColor.GRAY, ChatColor.ITALIC, command.getDescription()+"\n");
+ }
+ message = message.substring(0, message.length()-1);
+ sender.sendMessage(message);
+ }
+
+ public String getLabel() {
+ return "help";
+ }
+
+ public String getUsage() {
+ return "";
+ }
+
+ public String getDescription() {
+ return "Get the commands for the plugin";
+ }
+
+}