Class BungeeScriptCommand

java.lang.Object
net.md_5.bungee.api.plugin.Command
dev.magicmq.pyspigot.bungee.manager.command.BungeeScriptCommand
All Implemented Interfaces:
dev.magicmq.pyspigot.manager.command.ScriptCommand, net.md_5.bungee.api.plugin.TabExecutor

public class BungeeScriptCommand extends net.md_5.bungee.api.plugin.Command implements net.md_5.bungee.api.plugin.TabExecutor, dev.magicmq.pyspigot.manager.command.ScriptCommand
Represents a registered BungeeCord command belonging to a script.
See Also:
  • Command
  • TabExecutor
  • Constructor Summary

    Constructors
    Constructor
    Description
    BungeeScriptCommand(dev.magicmq.pyspigot.manager.script.Script script, PyFunction commandFunction, PyFunction tabFunction, String name, List<String> aliases, String permission)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(net.md_5.bungee.api.CommandSender sender, String[] args)
     
    dev.magicmq.pyspigot.manager.script.Script
    Get the script associated with this command.
    onTabComplete(net.md_5.bungee.api.CommandSender sender, String[] args)
     
    Prints a representation of this BungeeScriptCommand in string format, including all variables that pertain to the command (such as name, label, description, etc.)

    Methods inherited from class net.md_5.bungee.api.plugin.Command

    canEqual, equals, getAliases, getName, getPermission, getPermissionMessage, hashCode, hasPermission, setPermissionMessage

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface dev.magicmq.pyspigot.manager.command.ScriptCommand

    getName
  • Constructor Details

    • BungeeScriptCommand

      public BungeeScriptCommand(dev.magicmq.pyspigot.manager.script.Script script, PyFunction commandFunction, PyFunction tabFunction, String name, List<String> aliases, String permission)
      Parameters:
      script - The script to which this command belongs
      commandFunction - The command function that should be called when the command is executed
      tabFunction - The tab function that should be called for tab completion of the command. Can be null
      name - The name of the command to register
      aliases - A List of String containing all the aliases for this command. Use an empty list for no aliases
      permission - The required permission node to use this command. Can be null
  • Method Details

    • getScript

      public dev.magicmq.pyspigot.manager.script.Script getScript()
      Get the script associated with this command.
      Specified by:
      getScript in interface dev.magicmq.pyspigot.manager.command.ScriptCommand
      Returns:
      The script associated with this command
    • execute

      public void execute(net.md_5.bungee.api.CommandSender sender, String[] args)
      Specified by:
      execute in class net.md_5.bungee.api.plugin.Command
    • onTabComplete

      public Iterable<String> onTabComplete(net.md_5.bungee.api.CommandSender sender, String[] args)
      Specified by:
      onTabComplete in interface net.md_5.bungee.api.plugin.TabExecutor
    • toString

      public String toString()
      Prints a representation of this BungeeScriptCommand in string format, including all variables that pertain to the command (such as name, label, description, etc.)
      Overrides:
      toString in class net.md_5.bungee.api.plugin.Command
      Returns:
      A string representation of the BungeeScriptCommand