fix typos, update javadocs
This commit is contained in:
@@ -36,22 +36,29 @@ public interface CommandManager {
|
||||
void unregister(String alias);
|
||||
|
||||
/**
|
||||
* Calls CommandExecuteEvent and attempts to execute a command from the specified {@code cmdLine}
|
||||
* sync.
|
||||
* Calls CommandExecuteEvent and attempts to execute a command using the specified {@code cmdLine}
|
||||
* in a blocking fashion.
|
||||
*
|
||||
* @param source the command's source
|
||||
* @param cmdLine the command to run
|
||||
* @return true if the command was found and executed, false if it was not
|
||||
*
|
||||
* @deprecated This method will block current thread during event call and command execution.
|
||||
* Prefer {@link #executeAsync(CommandSource, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean execute(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Attempts to execute a command from the specified {@code cmdLine} sync
|
||||
* without calling CommandExecuteEvent.
|
||||
* Attempts to execute a command using the specified {@code cmdLine} in a blocking fashion without
|
||||
* calling CommandExecuteEvent.
|
||||
*
|
||||
* @param source the command's source
|
||||
* @param cmdLine the command to run
|
||||
* @return true if the command was found and executed, false if it was not
|
||||
*
|
||||
* @deprecated This method will block current thread during event and command execution.
|
||||
* Prefer {@link #executeImmediatelyAsync(CommandSource, String)} instead.
|
||||
*/
|
||||
boolean executeImmediately(CommandSource source, String cmdLine);
|
||||
|
||||
@@ -61,7 +68,8 @@ public interface CommandManager {
|
||||
*
|
||||
* @param source the command's source
|
||||
* @param cmdLine the command to run
|
||||
* @return A future that will be completed with the result of the command execution
|
||||
* @return A future that will be completed with the result of the command execution.
|
||||
* Can be completed exceptionally if exception was thrown during execution.
|
||||
*/
|
||||
CompletableFuture<Boolean> executeAsync(CommandSource source, String cmdLine);
|
||||
|
||||
@@ -71,7 +79,8 @@ public interface CommandManager {
|
||||
*
|
||||
* @param source the command's source
|
||||
* @param cmdLine the command to run
|
||||
* @return A future that will be completed with the result of the command execution
|
||||
* @return A future that will be completed with the result of the command execution.
|
||||
* Can be completed exceptionally if exception was thrown during execution.
|
||||
*/
|
||||
CompletableFuture<Boolean> executeImmediatelyAsync(CommandSource source, String cmdLine);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ public final class CommandExecuteEvent implements ResultedEvent<CommandResult> {
|
||||
private CommandResult result;
|
||||
|
||||
/**
|
||||
* Constructs a PlayerChatEvent.
|
||||
* Constructs a CommandExecuteEvent.
|
||||
* @param commandSource the source executing the command
|
||||
* @param command the command being executed without first slash
|
||||
*/
|
||||
@@ -52,7 +52,7 @@ public final class CommandExecuteEvent implements ResultedEvent<CommandResult> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PlayerCommmandEvent{"
|
||||
return "CommandExecuteEvent{"
|
||||
+ "commandSource=" + commandSource
|
||||
+ ", command=" + command
|
||||
+ ", result=" + result
|
||||
|
Reference in New Issue
Block a user