Skip to content

Commit c4a693d

Browse files
cleaned up
1 parent bea8e72 commit c4a693d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/datasiqn/commandcore/argument/Arguments.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import com.datasiqn.resultapi.Result;
55
import org.jetbrains.annotations.NotNull;
66

7-
import java.util.function.Function;
8-
97
/**
108
* Represents command arguments
119
*/
@@ -26,7 +24,7 @@ public interface Arguments {
2624
* @throws IndexOutOfBoundsException If {@code i} is an invalid index ({@code i} {@literal <} 0, or {@code i} {@literal >=} {@link #size()})
2725
*/
2826
default @NotNull <T> T get(int i, ArgumentType<T> type) {
29-
return getChecked(i, type).unwrapOrThrow((Function<String, IllegalArgumentException>) err -> new IllegalArgumentException("argument could not be parsed: " + err));
27+
return getChecked(i, type).<IllegalArgumentException>unwrapOrThrow(err -> new IllegalArgumentException("argument could not be parsed: " + err));
3028
}
3129

3230
/**

0 commit comments

Comments
 (0)