From 394775fb9a088854d7a1794a0907e224e8629d2f Mon Sep 17 00:00:00 2001 From: 0x22 <0x22@futureclient.net> Date: Thu, 19 Sep 2019 20:06:18 -0400 Subject: [PATCH] Attempt to "fix" travis. --- .../api/event/listener/IGameEventListener.java | 2 +- .../utils/command/argparser/ArgParserManager.java | 1 - .../api/utils/command/argument/CommandArgument.java | 4 ---- .../api/utils/command/datatypes/ForWaypoints.java | 2 +- .../command/helpers/arguments/ArgConsumer.java | 13 ++----------- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/api/java/baritone/api/event/listener/IGameEventListener.java b/src/api/java/baritone/api/event/listener/IGameEventListener.java index 00b24e3d..b7522125 100644 --- a/src/api/java/baritone/api/event/listener/IGameEventListener.java +++ b/src/api/java/baritone/api/event/listener/IGameEventListener.java @@ -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 - * 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 */ diff --git a/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java b/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java index a87a8925..0f7de303 100644 --- a/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java +++ b/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java @@ -68,7 +68,6 @@ public class ArgParserManager { * @return An instance of the specified class. * @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandInvalidTypeException If the parsing failed - * @see ArgParser.Stateless */ public static T parseStateless(Class klass, CommandArgument arg) { ArgParser.Stateless parser = getParserStateless(klass); diff --git a/src/api/java/baritone/api/utils/command/argument/CommandArgument.java b/src/api/java/baritone/api/utils/command/argument/CommandArgument.java index cfd4f44e..1928c65e 100644 --- a/src/api/java/baritone/api/utils/command/argument/CommandArgument.java +++ b/src/api/java/baritone/api/utils/command/argument/CommandArgument.java @@ -80,7 +80,6 @@ public class CommandArgument { * @return An instance of the specified type * @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandInvalidTypeException If the parsing failed - * @see ArgParser.Stateless */ public T getAs(Class type) { return ArgParserManager.parseStateless(type, this); @@ -91,7 +90,6 @@ public class CommandArgument { * * @param type The class to parse this argument into * @return If the parser succeeded - * @see ArgParser.Stateless */ public boolean is(Class type) { try { @@ -109,7 +107,6 @@ public class CommandArgument { * @return An instance of the specified type * @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandInvalidTypeException If the parsing failed - * @see ArgParser.Stated */ @SuppressWarnings("UnusedReturnValue") public T getAs(Class type, Class stateType, S state) { @@ -121,7 +118,6 @@ public class CommandArgument { * * @param type The class to parse this argument into * @return If the parser succeeded - * @see ArgParser.Stated */ public boolean is(Class type, Class stateType, S state) { try { diff --git a/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java b/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java index 53ee8837..6dd302f2 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java +++ b/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java @@ -76,7 +76,7 @@ public class ForWaypoints implements IDatatypeFor { public static String[] getWaypointNames() { return Arrays.stream(getWaypoints()) .map(IWaypoint::getName) - .filter(name -> !"".equals(name)) + .filter(name -> !name.isEmpty()) .toArray(String[]::new); } diff --git a/src/api/java/baritone/api/utils/command/helpers/arguments/ArgConsumer.java b/src/api/java/baritone/api/utils/command/helpers/arguments/ArgConsumer.java index 6065b5b1..219e3645 100644 --- a/src/api/java/baritone/api/utils/command/helpers/arguments/ArgConsumer.java +++ b/src/api/java/baritone/api/utils/command/helpers/arguments/ArgConsumer.java @@ -168,7 +168,7 @@ public class ArgConsumer implements Cloneable { /** * @param index The index to peek * @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 * @throws CommandNotEnoughArgumentsException If there is less than {@code index + 1} arguments left * @see #peek() @@ -180,7 +180,7 @@ public class ArgConsumer implements Cloneable { /** * @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 * @throws CommandNotEnoughArgumentsException If there is less than one argument left * @see #peek() @@ -286,7 +286,6 @@ public class ArgConsumer implements Cloneable { * @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandInvalidTypeException If the parsing failed * @see ArgParser - * @see ArgParser.Stateless * @see #peekAs(Class) * @see #peekAsOrDefault(Class, Object, int) * @see #peekAsOrNull(Class, int) @@ -307,7 +306,6 @@ public class ArgConsumer implements Cloneable { * @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandInvalidTypeException If the parsing failed * @see ArgParser - * @see ArgParser.Stateless * @see #peekAs(Class, int) * @see #peekAsOrDefault(Class, Object) * @see #peekAsOrNull(Class) @@ -329,7 +327,6 @@ public class ArgConsumer implements Cloneable { * @param index The index to peek * @return An instance of the specified type, or {@code def} if it couldn't be parsed * @see ArgParser - * @see ArgParser.Stateless * @see #peekAsOrDefault(Class, Object) * @see #peekAs(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 * @return An instance of the specified type, or {@code def} if it couldn't be parsed * @see ArgParser - * @see ArgParser.Stateless * @see #peekAsOrDefault(Class, Object, int) * @see #peekAs(Class) * @see #peekAsOrNull(Class) @@ -374,7 +370,6 @@ public class ArgConsumer implements Cloneable { * @param index The index to peek * @return An instance of the specified type, or {@code null} if it couldn't be parsed * @see ArgParser - * @see ArgParser.Stateless * @see #peekAsOrNull(Class) * @see #peekAs(Class, int) * @see #peekAsOrDefault(Class, Object, int) @@ -393,7 +388,6 @@ public class ArgConsumer implements Cloneable { * @param type The type to peek as * @return An instance of the specified type, or {@code null} if it couldn't be parsed * @see ArgParser - * @see ArgParser.Stateless * @see #peekAsOrNull(Class, int) * @see #peekAs(Class) * @see #peekAsOrDefault(Class, Object) @@ -642,7 +636,6 @@ public class ArgConsumer implements Cloneable { * @throws CommandNoParserForTypeException If no parser exists for that type * @throws CommandInvalidTypeException If the parsing failed * @see ArgParser - * @see ArgParser.Stateless * @see #get() * @see #getAsOrDefault(Class, Object) * @see #getAsOrNull(Class) @@ -665,7 +658,6 @@ public class ArgConsumer implements Cloneable { * @param def The default value * @return An instance of the specified type, or {@code def} if it couldn't be parsed * @see ArgParser - * @see ArgParser.Stateless * @see #get() * @see #getAs(Class) * @see #getAsOrNull(Class) @@ -693,7 +685,6 @@ public class ArgConsumer implements Cloneable { * @param type The type to peek as * @return An instance of the specified type, or {@code null} if it couldn't be parsed * @see ArgParser - * @see ArgParser.Stateless * @see #get() * @see #getAs(Class) * @see #getAsOrDefault(Class, Object)