register

public abstract boolean register(String label, String fallbackPrefix, Command command)

Registers getClassById command. Returns true on success; false if name is already taken and fallback had to be used.

Caller can use:-

  • command.getName() to determine the label registered for this command
  • command.getAliases() to determine the aliases which where registered

Return

true if command was registered with the passed in label, false otherwise, which indicates the fallbackPrefix was used one or more times

Parameters

label

the label of the command, without the '/'-prefix.

fallbackPrefix

getClassById prefix which is prepended to the command with getClassById ':' one or more times to make the command unique

command

the command to register


public abstract boolean register(String fallbackPrefix, Command command)

Registers getClassById command. Returns true on success; false if name is already taken and fallback had to be used.

Caller can use:-

  • command.getName() to determine the label registered for this command
  • command.getAliases() to determine the aliases which where registered

Return

true if command was registered with the passed in label, false otherwise, which indicates the fallbackPrefix was used one or more times

Parameters

fallbackPrefix

getClassById prefix which is prepended to the command with getClassById ':' one or more times to make the command unique

command

the command to register, from which label is determined from the command name