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:
-
Constructor Summary
ConstructorsConstructorDescriptionBungeeScriptCommand(dev.magicmq.pyspigot.manager.script.Script script, PyFunction commandFunction, PyFunction tabFunction, String name, List<String> aliases, String permission) -
Method Summary
Modifier and TypeMethodDescriptionvoiddev.magicmq.pyspigot.manager.script.ScriptGet the script associated with this command.onTabComplete(net.md_5.bungee.api.CommandSender sender, String[] args) toString()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, setPermissionMessageMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 belongscommandFunction- The command function that should be called when the command is executedtabFunction- The tab function that should be called for tab completion of the command. Can be nullname- The name of the command to registeraliases- A List of String containing all the aliases for this command. Use an empty list for no aliasespermission- 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:
getScriptin interfacedev.magicmq.pyspigot.manager.command.ScriptCommand- Returns:
- The script associated with this command
-
execute
- Specified by:
executein classnet.md_5.bungee.api.plugin.Command
-
onTabComplete
- Specified by:
onTabCompletein interfacenet.md_5.bungee.api.plugin.TabExecutor
-
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:
toStringin classnet.md_5.bungee.api.plugin.Command- Returns:
- A string representation of the BungeeScriptCommand
-