Expose registered aliases in API (#549)

This commit is contained in:
Hugo Manrique
2021-07-24 20:34:50 +02:00
committed by GitHub
parent 0bad9199dc
commit 76c6827926
4 changed files with 44 additions and 7 deletions

View File

@@ -8,6 +8,7 @@
package com.velocitypowered.api.command;
import com.velocitypowered.api.event.command.CommandExecuteEvent;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;
/**
@@ -94,11 +95,19 @@ public interface CommandManager {
*/
CompletableFuture<Boolean> executeImmediatelyAsync(CommandSource source, String cmdLine);
/**
* Returns an immutable collection of the case-insensitive aliases registered
* on this manager.
*
* @return the registered aliases
*/
Collection<String> getAliases();
/**
* Returns whether the given alias is registered on this manager.
*
* @param alias the command alias to check
* @return {@code true} if the alias is registered
* @return true if the alias is registered; false otherwise
*/
boolean hasCommand(String alias);
}