Added more JavaDoc for API usage

This commit is contained in:
tastybento 2023-08-01 09:43:47 -07:00
parent 1b2748f920
commit 397f9e4700
3 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,7 @@ public abstract class DefaultAdminCommand extends CompositeCommand {
*/
protected DefaultAdminCommand(GameModeAddon addon) {
// Register command with alias from config.
// The first command listed is the "label" and the others are aliases.
super(addon,
addon.getWorldSettings().getAdminCommandAliases().split(" ")[0],
addon.getWorldSettings().getAdminCommandAliases().split(" "));

View File

@ -23,6 +23,7 @@ public abstract class DefaultPlayerCommand extends CompositeCommand {
*/
protected DefaultPlayerCommand(GameModeAddon addon) {
// Register command with alias from config.
// The first command listed is the "label" and the others are aliases.
super(addon,
addon.getWorldSettings().getPlayerCommandAliases().split(" ")[0],
addon.getWorldSettings().getPlayerCommandAliases().split(" "));

View File

@ -549,6 +549,7 @@ public interface WorldSettings extends ConfigObject {
* Returns all aliases for main admin command.
* It is assumed that all aliases are split with whitespace between them.
* String cannot be empty.
* The first command listed is the "label" in the API, and after that are the aliases
* Default value: {@code getFriendlyName() + "admin"} (to retain backward compatibility).
* @return String value
* @since 1.13.0
@ -563,6 +564,7 @@ public interface WorldSettings extends ConfigObject {
* Returns all aliases for main player command.
* It is assumed that all aliases are split with whitespace between them.
* String cannot be empty.
* The first command listed is the "label" in the API, and after that are the aliases
* Default value: {@code getFriendlyName()} (to retain backward compatibility).
* @return String value
* @since 1.13.0