Lots of progress

This commit is contained in:
Alexander Söderberg 2020-09-05 21:38:12 +02:00
parent a9b2524238
commit d4143246b7
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
17 changed files with 606 additions and 84 deletions

View file

@ -23,20 +23,23 @@
//
package com.intellectualsites.commands.parser;
import com.intellectualsites.commands.context.CommandContext;
import com.intellectualsites.commands.sender.CommandSender;
import javax.annotation.Nonnull;
import java.util.Queue;
@FunctionalInterface public interface ComponentParser<T> {
@FunctionalInterface
public interface ComponentParser<C extends CommandSender, T> {
/**
* Parse command input into a command result
*
* @param sender Sender who sent the command
* @param inputQueue The queue of arguments
* @param commandContext Command context
* @param inputQueue The queue of arguments
* @return Parsed command result
*/
@Nonnull ComponentParseResult<T> parse(@Nonnull CommandSender sender, @Nonnull Queue<String> inputQueue);
@Nonnull
ComponentParseResult<T> parse(@Nonnull CommandContext<C> commandContext, @Nonnull Queue<String> inputQueue);
}