Class DynamicPluginCommand

java.lang.Object
org.bukkit.command.Command
com.sk89q.bukkit.util.DynamicPluginCommand
All Implemented Interfaces:
org.bukkit.command.PluginIdentifiableCommand

public class DynamicPluginCommand extends org.bukkit.command.Command implements org.bukkit.command.PluginIdentifiableCommand
An implementation of a dynamically registered Command attached to a plugin.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.bukkit.command.CommandExecutor
     
    protected final org.bukkit.plugin.Plugin
     
    protected String[]
     
    protected final Object
     

    Fields inherited from class org.bukkit.command.Command

    description, timings, usageMessage
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicPluginCommand(String[] aliases, String desc, String usage, org.bukkit.command.CommandExecutor owner, Object registeredWith, org.bukkit.plugin.Plugin plugin)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    execute(org.bukkit.command.CommandSender sender, String label, String[] args)
     
     
     
    org.bukkit.plugin.Plugin
     
     
    void
    setPermissions(String[] permissions)
     
    tabComplete(org.bukkit.command.CommandSender sender, String alias, String[] args)
     
    boolean
    testPermissionSilent(org.bukkit.command.CommandSender sender)
     

    Methods inherited from class org.bukkit.command.Command

    broadcastCommandMessage, broadcastCommandMessage, broadcastCommandMessage, broadcastCommandMessage, getAliases, getDescription, getLabel, getName, getPermission, getPermissionMessage, getTimingName, getUsage, isRegistered, permissionMessage, permissionMessage, register, setAliases, setDescription, setLabel, setName, setPermission, setPermissionMessage, setUsage, tabComplete, testPermission, toString, unregister

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • owner

      protected final org.bukkit.command.CommandExecutor owner
    • registeredWith

      protected final Object registeredWith
    • owningPlugin

      protected final org.bukkit.plugin.Plugin owningPlugin
    • permissions

      protected String[] permissions
  • Constructor Details

    • DynamicPluginCommand

      public DynamicPluginCommand(String[] aliases, String desc, String usage, org.bukkit.command.CommandExecutor owner, Object registeredWith, org.bukkit.plugin.Plugin plugin)
  • Method Details

    • execute

      public boolean execute(org.bukkit.command.CommandSender sender, String label, String[] args)
      Specified by:
      execute in class org.bukkit.command.Command
    • getOwner

      public Object getOwner()
    • getRegisteredWith

      public Object getRegisteredWith()
    • setPermissions

      public void setPermissions(String[] permissions)
    • getPermissions

      public String[] getPermissions()
    • getPlugin

      public org.bukkit.plugin.Plugin getPlugin()
      Specified by:
      getPlugin in interface org.bukkit.command.PluginIdentifiableCommand
    • tabComplete

      public List<String> tabComplete(org.bukkit.command.CommandSender sender, String alias, String[] args) throws IllegalArgumentException
      Overrides:
      tabComplete in class org.bukkit.command.Command
      Throws:
      IllegalArgumentException
    • testPermissionSilent

      public boolean testPermissionSilent(org.bukkit.command.CommandSender sender)
      Overrides:
      testPermissionSilent in class org.bukkit.command.Command