Class Converter

java.lang.Object
dev.jorel.commandapi.Converter

public final class Converter extends Object
'Simple' conversion of Plugin commands
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    convert(String cmdName)
    Convert the provided command name into a CommandAPI-compatible command
    static void
    convert(String cmdName, List<Argument<?>> arguments)
    Convert the provided command name with its list of arguments into a CommandAPI-compatible command
    static void
    convert(org.bukkit.plugin.java.JavaPlugin plugin)
    Convert all commands stated in Plugin's plugin.yml file into CommandAPI-compatible commands
    static void
    convert(org.bukkit.plugin.java.JavaPlugin plugin, String cmdName)
    Convert a command stated in Plugin's plugin.yml file into CommandAPI-compatible commands
    static void
    convert(org.bukkit.plugin.java.JavaPlugin plugin, String cmdName, Argument<?>... arguments)
    Convert a command stated in Plugin's plugin.yml file into CommandAPI-compatible commands
    static void
    convert(org.bukkit.plugin.java.JavaPlugin plugin, String cmdName, List<Argument<?>> arguments)
    Convert a command stated in Plugin's plugin.yml file into CommandAPI-compatible commands

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • convert

      public static void convert(org.bukkit.plugin.java.JavaPlugin plugin)
      Convert all commands stated in Plugin's plugin.yml file into CommandAPI-compatible commands
      Parameters:
      plugin - The plugin which commands are to be converted
    • convert

      public static void convert(org.bukkit.plugin.java.JavaPlugin plugin, String cmdName)
      Convert a command stated in Plugin's plugin.yml file into CommandAPI-compatible commands
      Parameters:
      plugin - The plugin where the command is registered
      cmdName - The command to convert
    • convert

      public static void convert(org.bukkit.plugin.java.JavaPlugin plugin, String cmdName, Argument<?>... arguments)
      Convert a command stated in Plugin's plugin.yml file into CommandAPI-compatible commands
      Parameters:
      plugin - The plugin where the command is registered
      cmdName - The command to convert
      arguments - The arguments that should be used to parse this command
    • convert

      public static void convert(org.bukkit.plugin.java.JavaPlugin plugin, String cmdName, List<Argument<?>> arguments)
      Convert a command stated in Plugin's plugin.yml file into CommandAPI-compatible commands
      Parameters:
      plugin - The plugin where the command is registered
      cmdName - The command to convert
      arguments - The arguments that should be used to parse this command
    • convert

      public static void convert(String cmdName)
      Convert the provided command name into a CommandAPI-compatible command
      Parameters:
      cmdName - The name of the command (without the leading /). For commands such as //set in WorldEdit, this parameter should be "/set"
    • convert

      public static void convert(String cmdName, List<Argument<?>> arguments)
      Convert the provided command name with its list of arguments into a CommandAPI-compatible command
      Parameters:
      cmdName - The name of the command (without the leading /). For commands such as //set in WorldEdit, this parameter should be "/set"
      arguments - The arguments that should be used to parse this command