From 7530fe5e2dad89cabd694aefc91758a651ca9196 Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Mon, 31 Oct 2022 23:28:45 -0400 Subject: 1.7.0 beta 1 --- .../hideAndSeek/command/util/Command.java | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/util/Command.java') 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 . + * + */ + +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 autoComplete(@Nullable String parameter); + + public boolean hasPermission(Player sender, String permission) { + return sender.hasPermission(permission+"."+getLabel()); + } + +} -- cgit v1.2.3-freya