fix typos, update javadocs

This commit is contained in:
Leymooo
2020-04-27 13:09:04 +03:00
parent c0b8e9d646
commit 26bf94f08f
3 changed files with 22 additions and 11 deletions

View File

@@ -64,14 +64,14 @@ public class VelocityCommandManager implements CommandManager {
* @return CompletableFuture of event
*/
public CompletableFuture<CommandExecuteEvent> callCommandEvent(CommandSource source, String cmd) {
Preconditions.checkNotNull(source, "invoker");
Preconditions.checkNotNull(source, "source");
Preconditions.checkNotNull(cmd, "cmd");
return eventManager.fire(new CommandExecuteEvent(source, cmd));
}
@Override
public boolean execute(CommandSource source, String cmdLine) {
Preconditions.checkNotNull(source, "invoker");
Preconditions.checkNotNull(source, "source");
Preconditions.checkNotNull(cmdLine, "cmdLine");
CommandExecuteEvent event = callCommandEvent(source, cmdLine).join();
@@ -86,7 +86,7 @@ public class VelocityCommandManager implements CommandManager {
@Override
public boolean executeImmediately(CommandSource source, String cmdLine) {
Preconditions.checkNotNull(source, "invoker");
Preconditions.checkNotNull(source, "source");
Preconditions.checkNotNull(cmdLine, "cmdLine");
String alias = cmdLine;
@@ -133,6 +133,8 @@ public class VelocityCommandManager implements CommandManager {
@Override
public CompletableFuture<Boolean> executeImmediatelyAsync(CommandSource source, String cmdLine) {
Preconditions.checkNotNull(source, "source");
Preconditions.checkNotNull(cmdLine, "cmdLine");
CompletableFuture<Boolean> result = new CompletableFuture<>();
eventManager.getService().execute(() -> {
try {