Skip to content

Commit

Permalink
Removed useless CommandProcessor S type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqzn committed Nov 4, 2024
1 parent e6a32ef commit c991fb9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Iterator;
import java.util.Queue;

record ChainImpl<S extends Source, P extends CommandProcessor<S>>(
record ChainImpl<S extends Source, P extends CommandProcessor>(
Queue<P> processors) implements CommandProcessingChain<S, P> {
@Override
public @NotNull Queue<P> getProcessors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @param <S> the command sender valueType
*/
public interface CommandPostProcessor<S extends Source> extends CommandProcessor<S> {
public interface CommandPostProcessor<S extends Source> extends CommandProcessor {

/**
* Processes context AFTER the resolving operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @param <S> the command sender valueType
*/
@FunctionalInterface
public interface CommandPreProcessor<S extends Source> extends CommandProcessor<S> {
public interface CommandPreProcessor<S extends Source> extends CommandProcessor {

/**
* Processes context BEFORE the resolving operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.PriorityQueue;
import java.util.Queue;

public interface CommandProcessingChain<S extends Source, P extends CommandProcessor<S>> extends Iterable<P> {
public interface CommandProcessingChain<S extends Source, P extends CommandProcessor> extends Iterable<P> {

@NotNull
Queue<P> getProcessors();
Expand All @@ -15,7 +15,7 @@ public interface CommandProcessingChain<S extends Source, P extends CommandProce

void add(P preProcessor);

final class Builder<S extends Source, P extends CommandProcessor<S>> {
final class Builder<S extends Source, P extends CommandProcessor> {
private final PriorityQueue<P> processors;

public Builder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package dev.velix.imperat.command.processors;

import dev.velix.imperat.context.Source;

public interface CommandProcessor<S extends Source> {
public interface CommandProcessor {

/**
* Returns the priority of the command processor.
Expand Down

0 comments on commit c991fb9

Please sign in to comment.