Class ScriptCommand
java.lang.Object
ch.njol.skript.command.ScriptCommand
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor
@Deprecated(since="2.17",
forRemoval=true)
public class ScriptCommand
extends Object
implements org.bukkit.command.TabExecutor
Deprecated, for removal: This API element is subject to removal in a future version.
This class is used for user-defined commands.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated, for removal: This API element is subject to removal in a future version.static final intDeprecated, for removal: This API element is subject to removal in a future version.static final intDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionScriptCommand(Script script, String name, String pattern, List<Argument<?>> arguments, String description, @Nullable String prefix, CommandUsage usage, List<String> aliases, String permission, @Nullable VariableString permissionMessage, @Nullable Timespan cooldown, @Nullable VariableString cooldownMessage, String cooldownBypass, @Nullable VariableString cooldownStorage, int executableBy, SectionNode node) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ScriptCommand.ScriptCommand(Script script, String name, String pattern, List<Argument<?>> arguments, String description, @Nullable String prefix, String usage, List<String> aliases, String permission, @Nullable VariableString permissionMessage, @Nullable Timespan cooldown, @Nullable VariableString cooldownMessage, String cooldownBypass, @Nullable VariableString cooldownStorage, int executableBy, SectionNode node) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ScriptCommand. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPermissions(org.bukkit.command.CommandSender sender, String commandLabel, String arguments) Deprecated, for removal: This API element is subject to removal in a future version.booleancheckPermissions(org.bukkit.command.CommandSender sender, org.bukkit.event.Event event) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Gets the arguments this command takes.org.bukkit.command.PluginCommandDeprecated, for removal: This API element is subject to removal in a future version.@Nullable TimespanDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.longgetElapsedMilliseconds(UUID uuid, org.bukkit.event.Event event) Deprecated, for removal: This API element is subject to removal in a future version.getLabel()Deprecated, for removal: This API element is subject to removal in a future version.@Nullable DategetLastUsage(UUID uuid, org.bukkit.event.Event event) Deprecated, for removal: This API element is subject to removal in a future version.getName()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.longgetRemainingMilliseconds(UUID uuid, org.bukkit.event.Event event) Deprecated, for removal: This API element is subject to removal in a future version.@Nullable ScriptDeprecated, for removal: This API element is subject to removal in a future version.booleanonCommand(@Nullable org.bukkit.command.CommandSender sender, @Nullable org.bukkit.command.Command command, @Nullable String label, @Nullable String[] args) Deprecated, for removal: This API element is subject to removal in a future version.onTabComplete(@Nullable org.bukkit.command.CommandSender sender, @Nullable org.bukkit.command.Command command, @Nullable String alias, @Nullable String[] args) Deprecated, for removal: This API element is subject to removal in a future version.voidregister(org.bukkit.command.SimpleCommandMap commandMap, Map<String, org.bukkit.command.Command> knownCommands, @Nullable Set<String> aliases) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidsendHelp(org.bukkit.command.CommandSender sender) Deprecated, for removal: This API element is subject to removal in a future version.voidsetElapsedMilliSeconds(UUID uuid, org.bukkit.event.Event event, long milliseconds) Deprecated, for removal: This API element is subject to removal in a future version.voidsetLastUsage(UUID uuid, org.bukkit.event.Event event, @Nullable Date date) Deprecated, for removal: This API element is subject to removal in a future version.voidsetRemainingMilliseconds(UUID uuid, org.bukkit.event.Event event, long milliseconds) Deprecated, for removal: This API element is subject to removal in a future version.voidunregister(org.bukkit.command.SimpleCommandMap commandMap, Map<String, org.bukkit.command.Command> knownCommands, @Nullable Set<String> aliases) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
PLAYERS
public static final int PLAYERSDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
CONSOLE
public static final int CONSOLEDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
BOTH
public static final int BOTHDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
ScriptCommand
public ScriptCommand(Script script, String name, String pattern, List<Argument<?>> arguments, String description, @Nullable @Nullable String prefix, String usage, List<String> aliases, String permission, @Nullable @Nullable VariableString permissionMessage, @Nullable @Nullable Timespan cooldown, @Nullable @Nullable VariableString cooldownMessage, String cooldownBypass, @Nullable @Nullable VariableString cooldownStorage, int executableBy, SectionNode node) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ScriptCommand. Prefer using the CommandUsage class for the usage parameter.- Parameters:
name- /namepattern- the Skript pattern used to parse the input into arguments.arguments- the list of Arguments this command takesdescription- description to display in /helpprefix- the prefix of the commandusage- message to display if the command was used incorrectlyaliases- /alias1, /alias2, ...permission- permission or null if nonepermissionMessage- message to display if the player doesn't have the given permissionnode- the node to parse and load into a Trigger
-
ScriptCommand
public ScriptCommand(Script script, String name, String pattern, List<Argument<?>> arguments, String description, @Nullable @Nullable String prefix, CommandUsage usage, List<String> aliases, String permission, @Nullable @Nullable VariableString permissionMessage, @Nullable @Nullable Timespan cooldown, @Nullable @Nullable VariableString cooldownMessage, String cooldownBypass, @Nullable @Nullable VariableString cooldownStorage, int executableBy, SectionNode node) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ScriptCommand.- Parameters:
name- /namepattern- the Skript pattern used to parse the input into arguments.arguments- the list of Arguments this command takesdescription- description to display in /helpprefix- the prefix of the commandusage- message to display if the command was used incorrectlyaliases- /alias1, /alias2, ...permission- permission or null if nonepermissionMessage- message to display if the player doesn't have the given permissionnode- the node to parse and load into a Trigger
-
-
Method Details
-
onCommand
public boolean onCommand(@Nullable @Nullable org.bukkit.command.CommandSender sender, @Nullable @Nullable org.bukkit.command.Command command, @Nullable @Nullable String label, @Nullable @Nullable String[] args) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
onCommandin interfaceorg.bukkit.command.CommandExecutor
-
execute
-
checkPermissions
-
checkPermissions
public boolean checkPermissions(org.bukkit.command.CommandSender sender, org.bukkit.event.Event event) Deprecated, for removal: This API element is subject to removal in a future version. -
sendHelp
public void sendHelp(org.bukkit.command.CommandSender sender) Deprecated, for removal: This API element is subject to removal in a future version. -
getArguments
-
getPattern
Deprecated, for removal: This API element is subject to removal in a future version. -
register
-
unregister
-
registerHelp
public void registerHelp()Deprecated, for removal: This API element is subject to removal in a future version. -
unregisterHelp
public void unregisterHelp()Deprecated, for removal: This API element is subject to removal in a future version. -
getName
Deprecated, for removal: This API element is subject to removal in a future version. -
getPrefix
Deprecated, for removal: This API element is subject to removal in a future version. -
getLabel
Deprecated, for removal: This API element is subject to removal in a future version. -
getCooldown
Deprecated, for removal: This API element is subject to removal in a future version. -
getLastUsage
-
setLastUsage
-
getRemainingMilliseconds
Deprecated, for removal: This API element is subject to removal in a future version. -
setRemainingMilliseconds
Deprecated, for removal: This API element is subject to removal in a future version. -
getElapsedMilliseconds
Deprecated, for removal: This API element is subject to removal in a future version. -
setElapsedMilliSeconds
Deprecated, for removal: This API element is subject to removal in a future version. -
getCooldownBypass
Deprecated, for removal: This API element is subject to removal in a future version. -
getAliases
-
getActiveAliases
-
getBukkitCommand
public org.bukkit.command.PluginCommand getBukkitCommand()Deprecated, for removal: This API element is subject to removal in a future version. -
getScript
Deprecated, for removal: This API element is subject to removal in a future version. -
onTabComplete
@Nullable public @Nullable List<String> onTabComplete(@Nullable @Nullable org.bukkit.command.CommandSender sender, @Nullable @Nullable org.bukkit.command.Command command, @Nullable @Nullable String alias, @Nullable @Nullable String[] args) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
onTabCompletein interfaceorg.bukkit.command.TabCompleter
-
ScriptBrigadierCommand.