Register your own command
public final class NearCommand implements SuperiorCommand {
@Override
public List<String> getAliases() {
// A list of aliases. The first argument will be the label of the subcommand.
return Arrays.asList("near", "nearby");
}
@Override
public String getPermission() {
// The required permission for the command. If you don't want a specific permission, use "".
return "";
}
@Override
public String getUsage(Locale locale) {
// The usage of the command. Should only include the label & arguments of the command.
return "near";
}
@Override
public String getDescription(Locale locale) {
// The description of the command, which will be shown in /is help.
return "Locate nearby islands.";
}
@Override
public int getMinArgs() {
// Minimum arguments for the command, including the label.
return 1;
}
@Override
public int getMaxArgs() {
// Maximum arguments for the command, including the label.
return 1;
}
@Override
public boolean canBeExecutedByConsole() {
// Whether or not the command can be executed from Console.
return false;
}
@Override
public boolean displayCommand() {
// Whether or not the command would be displayed in the /is help list.
return true;
}
@Override
public void execute(SuperiorSkyblock plugin, CommandSender sender, String[] args) {
// TODO
}
@Override
public List<String> tabComplete(SuperiorSkyblock plugin, CommandSender sender, String[] args) {
// TODO
return new ArrayList<>();
}
}Last updated