✨ Work towards making CommandMeta typesafe (#173)
Co-authored-by: Alexander Söderberg <sauilitired@gmail.com>
This commit is contained in:
parent
ab366be24d
commit
1e91273e0e
33 changed files with 450 additions and 64 deletions
|
|
@ -119,8 +119,8 @@ public class PircBotXCommandManager<C> extends CommandManager<C> {
|
|||
|
||||
@Override
|
||||
public final boolean hasPermission(
|
||||
@NonNull final C sender,
|
||||
@NonNull final String permission
|
||||
final @NonNull C sender,
|
||||
final @NonNull String permission
|
||||
) {
|
||||
return this.permissionFunction.apply(sender, permission);
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ public class PircBotXCommandManager<C> extends CommandManager<C> {
|
|||
return this.commandPrefix;
|
||||
}
|
||||
|
||||
@NonNull final Function<User, C> getUserMapper() {
|
||||
final @NonNull Function<User, C> getUserMapper() {
|
||||
return this.userMapper;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,8 +128,8 @@ public final class UserArgument<C> extends CommandArgument<C, User> {
|
|||
|
||||
@Override
|
||||
public @NonNull ArgumentParseResult<@NonNull User> parse(
|
||||
@NonNull final CommandContext<@NonNull C> commandContext,
|
||||
@NonNull final Queue<@NonNull String> inputQueue
|
||||
final @NonNull CommandContext<@NonNull C> commandContext,
|
||||
final @NonNull Queue<@NonNull String> inputQueue
|
||||
) {
|
||||
final String input = inputQueue.peek();
|
||||
if (input == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue