Remove unused generic
This commit is contained in:
parent
2bffe75ac9
commit
e5de081185
6 changed files with 11 additions and 9 deletions
|
@ -5,7 +5,6 @@ package com.mojang.brigadier.arguments;
|
|||
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.context.CommandContextBuilder;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.mojang.brigadier.suggestion.Suggestions;
|
||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||
|
@ -15,7 +14,7 @@ import java.util.Collections;
|
|||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public interface ArgumentType<T> {
|
||||
<S> T parse(StringReader reader) throws CommandSyntaxException;
|
||||
T parse(StringReader reader) throws CommandSyntaxException;
|
||||
|
||||
default <S> CompletableFuture<Suggestions> listSuggestions(final CommandContext<S> context, final SuggestionsBuilder builder) {
|
||||
return Suggestions.empty();
|
||||
|
|
|
@ -5,7 +5,6 @@ package com.mojang.brigadier.arguments;
|
|||
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.context.CommandContextBuilder;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.mojang.brigadier.suggestion.Suggestions;
|
||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||
|
@ -29,7 +28,7 @@ public class BoolArgumentType implements ArgumentType<Boolean> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <S> Boolean parse(final StringReader reader) throws CommandSyntaxException {
|
||||
public Boolean parse(final StringReader reader) throws CommandSyntaxException {
|
||||
return reader.readBoolean();
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class DoubleArgumentType implements ArgumentType<Double> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <S> Double parse(final StringReader reader) throws CommandSyntaxException {
|
||||
public Double parse(final StringReader reader) throws CommandSyntaxException {
|
||||
final int start = reader.getCursor();
|
||||
final double result = reader.readDouble();
|
||||
if (result < minimum) {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class FloatArgumentType implements ArgumentType<Float> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <S> Float parse(final StringReader reader) throws CommandSyntaxException {
|
||||
public Float parse(final StringReader reader) throws CommandSyntaxException {
|
||||
final int start = reader.getCursor();
|
||||
final float result = reader.readFloat();
|
||||
if (result < minimum) {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class IntegerArgumentType implements ArgumentType<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <S> Integer parse(final StringReader reader) throws CommandSyntaxException {
|
||||
public Integer parse(final StringReader reader) throws CommandSyntaxException {
|
||||
final int start = reader.getCursor();
|
||||
final int result = reader.readInt();
|
||||
if (result < minimum) {
|
||||
|
@ -84,4 +84,9 @@ public class IntegerArgumentType implements ArgumentType<Integer> {
|
|||
return "integer(" + minimum + ", " + maximum + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<String> getExamples() {
|
||||
return EXAMPLES;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ package com.mojang.brigadier.arguments;
|
|||
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.context.CommandContextBuilder;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -39,7 +38,7 @@ public class StringArgumentType implements ArgumentType<String> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <S> String parse(final StringReader reader) throws CommandSyntaxException {
|
||||
public String parse(final StringReader reader) throws CommandSyntaxException {
|
||||
if (type == StringType.GREEDY_PHRASE) {
|
||||
final String text = reader.getRemaining();
|
||||
reader.setCursor(reader.getTotalLength());
|
||||
|
|
Loading…
Reference in a new issue