Interface ViaSubCommand


public interface ViaSubCommand
  • 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

      default String usage()
      Usage example: "playerversion [name]"
      Returns:
      The commands usage
    • permission

      default String permission()
      Permission, null for everyone
      Returns:
      The permission required to use the commands
    • execute

      boolean execute(ViaCommandSender sender, String[] args)
      Gets triggered on execution
      Parameters:
      sender - Command sender
      args - Arguments
      Returns:
      commands executed succesfully if false, show usage
    • onTabComplete

      default List<String> onTabComplete(ViaCommandSender sender, String[] args)
      Yay, possibility to implement tab-completion
      Parameters:
      sender - Command sender
      args - args
      Returns:
      tab complete possibilities
    • color

      static String color(String s)
      Replaces color codes in a string.
      Parameters:
      s - string to replace
      Returns:
      output String
    • sendMessage

      default void sendMessage(ViaCommandSender sender, String message, Object... args)
      Send a color coded string with replacements to a user.
      Parameters:
      sender - target to send the message to
      message - message
      args - objects to replace