Merge pull request #954 from 0-x-2-2/commands

Attempt to "fix" travis.
This commit is contained in:
Leijurv 2019-09-19 17:10:26 -07:00 committed by GitHub
commit fae24beaed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 18 deletions

View File

@ -66,7 +66,7 @@ public interface IGameEventListener {
/** /**
* Runs whenever the client player tries to tab complete in chat once completions have been recieved from the * Runs whenever the client player tries to tab complete in chat once completions have been recieved from the
* server. This will only be called if the {@link TabCompleteEvent.Pre#cancel()} method was not called. * server. This will only be called if the {@link TabCompleteEvent#cancel()} method was not called.
* *
* @param event The event * @param event The event
*/ */

View File

@ -68,7 +68,6 @@ public class ArgParserManager {
* @return An instance of the specified class. * @return An instance of the specified class.
* @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandNoParserForTypeException If no parser exists for that type
* @throws CommandInvalidTypeException If the parsing failed * @throws CommandInvalidTypeException If the parsing failed
* @see ArgParser.Stateless
*/ */
public static <T> T parseStateless(Class<T> klass, CommandArgument arg) { public static <T> T parseStateless(Class<T> klass, CommandArgument arg) {
ArgParser.Stateless<T> parser = getParserStateless(klass); ArgParser.Stateless<T> parser = getParserStateless(klass);

View File

@ -80,7 +80,6 @@ public class CommandArgument {
* @return An instance of the specified type * @return An instance of the specified type
* @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandNoParserForTypeException If no parser exists for that type
* @throws CommandInvalidTypeException If the parsing failed * @throws CommandInvalidTypeException If the parsing failed
* @see ArgParser.Stateless
*/ */
public <T> T getAs(Class<T> type) { public <T> T getAs(Class<T> type) {
return ArgParserManager.parseStateless(type, this); return ArgParserManager.parseStateless(type, this);
@ -91,7 +90,6 @@ public class CommandArgument {
* *
* @param type The class to parse this argument into * @param type The class to parse this argument into
* @return If the parser succeeded * @return If the parser succeeded
* @see ArgParser.Stateless
*/ */
public <T> boolean is(Class<T> type) { public <T> boolean is(Class<T> type) {
try { try {
@ -109,7 +107,6 @@ public class CommandArgument {
* @return An instance of the specified type * @return An instance of the specified type
* @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandNoParserForTypeException If no parser exists for that type
* @throws CommandInvalidTypeException If the parsing failed * @throws CommandInvalidTypeException If the parsing failed
* @see ArgParser.Stated
*/ */
@SuppressWarnings("UnusedReturnValue") @SuppressWarnings("UnusedReturnValue")
public <T, S> T getAs(Class<T> type, Class<S> stateType, S state) { public <T, S> T getAs(Class<T> type, Class<S> stateType, S state) {
@ -121,7 +118,6 @@ public class CommandArgument {
* *
* @param type The class to parse this argument into * @param type The class to parse this argument into
* @return If the parser succeeded * @return If the parser succeeded
* @see ArgParser.Stated
*/ */
public <T, S> boolean is(Class<T> type, Class<S> stateType, S state) { public <T, S> boolean is(Class<T> type, Class<S> stateType, S state) {
try { try {

View File

@ -76,7 +76,7 @@ public class ForWaypoints implements IDatatypeFor<IWaypoint[]> {
public static String[] getWaypointNames() { public static String[] getWaypointNames() {
return Arrays.stream(getWaypoints()) return Arrays.stream(getWaypoints())
.map(IWaypoint::getName) .map(IWaypoint::getName)
.filter(name -> !"".equals(name)) .filter(name -> !name.isEmpty())
.toArray(String[]::new); .toArray(String[]::new);
} }

View File

@ -168,7 +168,7 @@ public class ArgConsumer implements Cloneable {
/** /**
* @param index The index to peek * @param index The index to peek
* @param type The type to check for * @param type The type to check for
* @return If an {@link ArgParser.Stateless} for the specified {@code type} would succeed in parsing the next * @return If an ArgParser.Stateless for the specified {@code type} would succeed in parsing the next
* argument * argument
* @throws CommandNotEnoughArgumentsException If there is less than {@code index + 1} arguments left * @throws CommandNotEnoughArgumentsException If there is less than {@code index + 1} arguments left
* @see #peek() * @see #peek()
@ -180,7 +180,7 @@ public class ArgConsumer implements Cloneable {
/** /**
* @param type The type to check for * @param type The type to check for
* @return If an {@link ArgParser.Stateless} for the specified {@code type} would succeed in parsing the next * @return If an ArgParser.Stateless for the specified {@code type} would succeed in parsing the next
* argument * argument
* @throws CommandNotEnoughArgumentsException If there is less than one argument left * @throws CommandNotEnoughArgumentsException If there is less than one argument left
* @see #peek() * @see #peek()
@ -286,7 +286,6 @@ public class ArgConsumer implements Cloneable {
* @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandNoParserForTypeException If no parser exists for that type
* @throws CommandInvalidTypeException If the parsing failed * @throws CommandInvalidTypeException If the parsing failed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #peekAs(Class) * @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object, int) * @see #peekAsOrDefault(Class, Object, int)
* @see #peekAsOrNull(Class, int) * @see #peekAsOrNull(Class, int)
@ -307,7 +306,6 @@ public class ArgConsumer implements Cloneable {
* @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandNoParserForTypeException If no parser exists for that type
* @throws CommandInvalidTypeException If the parsing failed * @throws CommandInvalidTypeException If the parsing failed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #peekAs(Class, int) * @see #peekAs(Class, int)
* @see #peekAsOrDefault(Class, Object) * @see #peekAsOrDefault(Class, Object)
* @see #peekAsOrNull(Class) * @see #peekAsOrNull(Class)
@ -329,7 +327,6 @@ public class ArgConsumer implements Cloneable {
* @param index The index to peek * @param index The index to peek
* @return An instance of the specified type, or {@code def} if it couldn't be parsed * @return An instance of the specified type, or {@code def} if it couldn't be parsed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #peekAsOrDefault(Class, Object) * @see #peekAsOrDefault(Class, Object)
* @see #peekAs(Class, int) * @see #peekAs(Class, int)
* @see #peekAsOrNull(Class, int) * @see #peekAsOrNull(Class, int)
@ -353,7 +350,6 @@ public class ArgConsumer implements Cloneable {
* @param def The value to return if the argument can't be parsed * @param def The value to return if the argument can't be parsed
* @return An instance of the specified type, or {@code def} if it couldn't be parsed * @return An instance of the specified type, or {@code def} if it couldn't be parsed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #peekAsOrDefault(Class, Object, int) * @see #peekAsOrDefault(Class, Object, int)
* @see #peekAs(Class) * @see #peekAs(Class)
* @see #peekAsOrNull(Class) * @see #peekAsOrNull(Class)
@ -374,7 +370,6 @@ public class ArgConsumer implements Cloneable {
* @param index The index to peek * @param index The index to peek
* @return An instance of the specified type, or {@code null} if it couldn't be parsed * @return An instance of the specified type, or {@code null} if it couldn't be parsed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #peekAsOrNull(Class) * @see #peekAsOrNull(Class)
* @see #peekAs(Class, int) * @see #peekAs(Class, int)
* @see #peekAsOrDefault(Class, Object, int) * @see #peekAsOrDefault(Class, Object, int)
@ -393,7 +388,6 @@ public class ArgConsumer implements Cloneable {
* @param type The type to peek as * @param type The type to peek as
* @return An instance of the specified type, or {@code null} if it couldn't be parsed * @return An instance of the specified type, or {@code null} if it couldn't be parsed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #peekAsOrNull(Class, int) * @see #peekAsOrNull(Class, int)
* @see #peekAs(Class) * @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object) * @see #peekAsOrDefault(Class, Object)
@ -642,7 +636,6 @@ public class ArgConsumer implements Cloneable {
* @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandNoParserForTypeException If no parser exists for that type
* @throws CommandInvalidTypeException If the parsing failed * @throws CommandInvalidTypeException If the parsing failed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #get() * @see #get()
* @see #getAsOrDefault(Class, Object) * @see #getAsOrDefault(Class, Object)
* @see #getAsOrNull(Class) * @see #getAsOrNull(Class)
@ -665,7 +658,6 @@ public class ArgConsumer implements Cloneable {
* @param def The default value * @param def The default value
* @return An instance of the specified type, or {@code def} if it couldn't be parsed * @return An instance of the specified type, or {@code def} if it couldn't be parsed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #get() * @see #get()
* @see #getAs(Class) * @see #getAs(Class)
* @see #getAsOrNull(Class) * @see #getAsOrNull(Class)
@ -693,7 +685,6 @@ public class ArgConsumer implements Cloneable {
* @param type The type to peek as * @param type The type to peek as
* @return An instance of the specified type, or {@code null} if it couldn't be parsed * @return An instance of the specified type, or {@code null} if it couldn't be parsed
* @see ArgParser * @see ArgParser
* @see ArgParser.Stateless
* @see #get() * @see #get()
* @see #getAs(Class) * @see #getAs(Class)
* @see #getAsOrDefault(Class, Object) * @see #getAsOrDefault(Class, Object)