Interface ViaSubCommand
public interface ViaSubCommand
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Replaces color codes in a string.subcommand description, this'll show in /viaversion listboolean
execute
(ViaCommandSender sender, String[] args) Gets triggered on executionname()
Subcommand nameonTabComplete
(ViaCommandSender sender, String[] args) Yay, possibility to implement tab-completiondefault String
Permission, null for everyonedefault void
sendMessage
(ViaCommandSender sender, String message, Object... args) Send a color coded string with replacements to a user.default String
usage()
Usage example: "playerversion [name]"
-
Method Details
-
name
String name()Subcommand name- Returns:
- The commands name
-
description
String description()subcommand description, this'll show in /viaversion list- Returns:
- The commands description
-
usage
Usage example: "playerversion [name]"- Returns:
- The commands usage
-
permission
Permission, null for everyone- Returns:
- The permission required to use the commands
-
execute
Gets triggered on execution- Parameters:
sender
- Command senderargs
- Arguments- Returns:
- commands executed succesfully if false, show usage
-
onTabComplete
Yay, possibility to implement tab-completion- Parameters:
sender
- Command senderargs
- args- Returns:
- tab complete possibilities
-
color
Replaces color codes in a string.- Parameters:
s
- string to replace- Returns:
- output String
-
sendMessage
Send a color coded string with replacements to a user.- Parameters:
sender
- target to send the message tomessage
- messageargs
- objects to replace
-