dev.jorel.commandapi.CommandMetaData Maven / Gradle / Ivy
The newest version!
package dev.jorel.commandapi;
import dev.jorel.commandapi.commandsenders.AbstractCommandSender;
import dev.jorel.commandapi.exceptions.InvalidCommandNameException;
import java.util.Arrays;
import java.util.Optional;
import java.util.function.Predicate;
/**
* This class stores metadata about a command
*/
final class CommandMetaData {
/**
* The command's name
*/
final String commandName;
/**
* The command's permission
*/
CommandPermission permission = CommandPermission.NONE;
/**
* The command's aliases
*/
String[] aliases = new String[0];
/**
* A predicate that a {@link AbstractCommandSender} must pass in order to execute the command
*/
Predicate requirements = s -> true;
/**
* An optional short description for the command
*/
Optional shortDescription = Optional.empty();
/**
* An optional full description for the command
*/
Optional fullDescription = Optional.empty();
/**
* An optional usage description for the command
*/
Optional usageDescription = Optional.empty();
/**
* An optional HelpTopic object for the command (for Bukkit)
*/
Optional