Interface ViaVersionCommand


  • public interface ViaVersionCommand
    • Method Detail

      • registerSubCommand

        void registerSubCommand​(ViaSubCommand command)
                         throws java.lang.Exception
        Register your own subcommand inside ViaVersion
        Parameters:
        command - Your own SubCommand instance to handle it.
        Throws:
        java.lang.Exception - throws an exception when the subcommand already exists or if it's not valid, example: spacee
      • hasSubCommand

        boolean hasSubCommand​(java.lang.String name)
        Check if a subcommand is registered.
        Parameters:
        name - Subcommand name
        Returns:
        true if it exists
      • getSubCommand

        @Nullable ViaSubCommand getSubCommand​(java.lang.String name)
        Get subcommand instance by name
        Parameters:
        name - subcommand name
        Returns:
        ViaSubCommand instance
      • onCommand

        boolean onCommand​(ViaCommandSender sender,
                          java.lang.String[] args)
        Executed when the Command sender executes the commands
        Parameters:
        sender - Sender object
        args - arguments provided
        Returns:
        was successful
      • onTabComplete

        java.util.List<java.lang.String> onTabComplete​(ViaCommandSender sender,
                                                       java.lang.String[] args)
        Executed when the Command sender tab-completes
        Parameters:
        sender - Sender object
        args - arguments provided
        Returns:
        was successful