Class PluginCommand

java.lang.Object
eu.hexagonmc.spigot.annotation.meta.PluginCommand

public class PluginCommand extends Object
  • Constructor Details

    • PluginCommand

      public PluginCommand(String name)
      Creates a new command the given name.
      Parameters:
      name - The name of the command
  • Method Details

    • from

      public static PluginCommand from(Command annotation)
      Creates command from an annotation. Parses the data stored in the annotation.
      Parameters:
      annotation - The annotation to parse for data
      Returns:
      The new command
      See Also:
    • setName

      public void setName(String name)
      Sets the name of this command.
      Parameters:
      name - The name to set
    • getName

      public String getName()
      Gets the name of this command.
      Returns:
      The name
    • setDescription

      public void setDescription(String description)
      Sets the description of this command.
      Parameters:
      description - The description to set
    • getDescription

      public String getDescription()
      Gets the description of this command.
      Returns:
      The description
    • addAlias

      public void addAlias(String alias)
      Adds an alias to this command.
      Parameters:
      alias - The alias to add
    • removeAlias

      public boolean removeAlias(String alias)
      Removes an alias from this command.
      Parameters:
      alias - The alias to remove
      Returns:
      true if the command was removed false if it did not exist
    • getAliases

      public Collection<String> getAliases()
      Gets the list of aliases for this command.
      Returns:
      The list of aliases
    • setPermission

      public void setPermission(String permission)
      Sets the permission of this command.
      Parameters:
      permission - The permission to set
    • getPermission

      public String getPermission()
      Gets the permission of this command.
      Returns:
      The permission
    • setUsage

      public void setUsage(String usage)
      Sets the usage of this command.
      Parameters:
      usage - The usage to set
    • getUsage

      public String getUsage()
      Gets the usage of this command.
      Returns:
      The usage
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object