diff --git a/src/main/java/com/mojang/brigadier/arguments/ArgumentType.java b/src/main/java/com/mojang/brigadier/arguments/ArgumentType.java index 4caca32..f060b59 100644 --- a/src/main/java/com/mojang/brigadier/arguments/ArgumentType.java +++ b/src/main/java/com/mojang/brigadier/arguments/ArgumentType.java @@ -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 parse(StringReader reader) throws CommandSyntaxException; + T parse(StringReader reader) throws CommandSyntaxException; default CompletableFuture listSuggestions(final CommandContext context, final SuggestionsBuilder builder) { return Suggestions.empty(); diff --git a/src/main/java/com/mojang/brigadier/arguments/BoolArgumentType.java b/src/main/java/com/mojang/brigadier/arguments/BoolArgumentType.java index d04ae84..cb993ca 100644 --- a/src/main/java/com/mojang/brigadier/arguments/BoolArgumentType.java +++ b/src/main/java/com/mojang/brigadier/arguments/BoolArgumentType.java @@ -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 { } @Override - public Boolean parse(final StringReader reader) throws CommandSyntaxException { + public Boolean parse(final StringReader reader) throws CommandSyntaxException { return reader.readBoolean(); } diff --git a/src/main/java/com/mojang/brigadier/arguments/DoubleArgumentType.java b/src/main/java/com/mojang/brigadier/arguments/DoubleArgumentType.java index 8d1429f..8da87d0 100644 --- a/src/main/java/com/mojang/brigadier/arguments/DoubleArgumentType.java +++ b/src/main/java/com/mojang/brigadier/arguments/DoubleArgumentType.java @@ -46,7 +46,7 @@ public class DoubleArgumentType implements ArgumentType { } @Override - public 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) { diff --git a/src/main/java/com/mojang/brigadier/arguments/FloatArgumentType.java b/src/main/java/com/mojang/brigadier/arguments/FloatArgumentType.java index 42113e4..e6811ac 100644 --- a/src/main/java/com/mojang/brigadier/arguments/FloatArgumentType.java +++ b/src/main/java/com/mojang/brigadier/arguments/FloatArgumentType.java @@ -46,7 +46,7 @@ public class FloatArgumentType implements ArgumentType { } @Override - public 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) { diff --git a/src/main/java/com/mojang/brigadier/arguments/IntegerArgumentType.java b/src/main/java/com/mojang/brigadier/arguments/IntegerArgumentType.java index f9529d2..d4e2365 100644 --- a/src/main/java/com/mojang/brigadier/arguments/IntegerArgumentType.java +++ b/src/main/java/com/mojang/brigadier/arguments/IntegerArgumentType.java @@ -46,7 +46,7 @@ public class IntegerArgumentType implements ArgumentType { } @Override - public 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 { return "integer(" + minimum + ", " + maximum + ")"; } } + + @Override + public Collection getExamples() { + return EXAMPLES; + } } diff --git a/src/main/java/com/mojang/brigadier/arguments/StringArgumentType.java b/src/main/java/com/mojang/brigadier/arguments/StringArgumentType.java index 3a007e5..0e36f34 100644 --- a/src/main/java/com/mojang/brigadier/arguments/StringArgumentType.java +++ b/src/main/java/com/mojang/brigadier/arguments/StringArgumentType.java @@ -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 { } @Override - public 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());