Skip to content

Commit

Permalink
Update to 1.130.1, fix FlashList indexOf npe
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablete1234 committed Mar 19, 2024
1 parent 09bd579 commit 5ca7370
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/github/manolo8/darkbot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class Main extends Thread implements PluginListener, BotAPI {
/** Do not use in plugins! Only for bot internal usage */
@ApiStatus.Internal public static Main INSTANCE;

public static final Version VERSION = new Version("1.130");
public static final Version VERSION = new Version("1.130.1");
public static final Object UPDATE_LOCKER = new Object();
public static final Gson GSON = new GsonBuilder()
.setPrettyPrinting()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ public void add(int index, E element) {
@Override
public int indexOf(Object value) {
for (int i = 0; i < size(); i++) {
if (value.equals(get(i))) return i;
if (Objects.equals(value, get(i))) return i;
}
return -1;
}

@Override
public int lastIndexOf(Object value) {
for (int i = size() - 1; i >= 0; i--)
if (value.equals(get(i))) return i;
if (Objects.equals(value, get(i))) return i;
return -1;
}

Expand Down

0 comments on commit 5ca7370

Please sign in to comment.