summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java b/src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java
new file mode 100644
index 0000000..d03274d
--- /dev/null
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Kenshins Hide and Seek
+ *
+ * Copyright (c) 2021 Tyler Murphy.
+ *
+ * Kenshins Hide and Seek free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * he Free Software Foundation version 3.
+ *
+ * Kenshins Hide and Seek is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package net.tylermurphy.hideAndSeek.command.util;
+
+import org.bukkit.entity.Player;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.List;
+
+public abstract class Command {
+
+ public abstract void execute(Player sender, String[] args);
+
+ public abstract String getLabel();
+
+ public abstract String getUsage();
+
+ public abstract String getDescription();
+
+ public abstract List<String> autoComplete(@Nullable String parameter);
+
+ public boolean hasPermission(Player sender, String permission) {
+ return sender.hasPermission(permission+"."+getLabel());
+ }
+
+}