Skip to content

Fix mod status update for options missing from API#252

Merged
ItsNature merged 1 commit intoversion/1.2.3from
fix/mod-status-null-check
Feb 24, 2026
Merged

Fix mod status update for options missing from API#252
ItsNature merged 1 commit intoversion/1.2.3from
fix/mod-status-null-check

Conversation

@ItsNature
Copy link
Collaborator

@ItsNature ItsNature commented Feb 23, 2026

Overview

Description:
Prevent mod status options from updating for options that exist on the client but are not yet supported by the API.

Changes:
Added a null check to skip options that are not returned by the API

Related Issue:

java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Caused by: java.lang.NullPointerException: Cannot invoke "com.lunarclient.apollo.option.Option.getTypeToken()" because "option" is null
	at apollo-bukkit-1.2.1.jar//com.lunarclient.apollo.module.modsettings.ModSettingModuleImpl.updateOptions(ModSettingModuleImpl.java:122)
	at apollo-bukkit-1.2.1.jar//com.lunarclient.apollo.player.ApolloPlayerManagerImpl.handlePlayerHandshake(ApolloPlayerManagerImpl.java:171)
	at apollo-bukkit-1.2.1.jar//com.lunarclient.apollo.listener.ApolloPlayerListener.lambda$onApolloReceivePacket$0(ApolloPlayerListener.java:118)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at apollo-bukkit-1.2.1.jar//com.lunarclient.apollo.listener.ApolloPlayerListener.onApolloReceivePacket(ApolloPlayerListener.java:117)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 21 more

Review Request Checklist

  • Your code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have tested this change myself. (If applicable)
  • I have made corresponding changes to the documentation. (If applicable)
  • The branch name follows the projects naming conventions. (e.g. feature/add-module & bugfix/fix-issue)

@ItsNature ItsNature added the type: Bug Something is broken :( label Feb 23, 2026
@ItsNature ItsNature force-pushed the fix/mod-status-null-check branch from e7bfcb6 to 82642ba Compare February 24, 2026 20:52
@ItsNature ItsNature merged commit 587f69f into version/1.2.3 Feb 24, 2026
2 checks passed
@ItsNature ItsNature deleted the fix/mod-status-null-check branch February 24, 2026 21:05
ItsNature added a commit that referenced this pull request Feb 25, 2026
* Deploy as 1.2.3-SNAPSHOT

* Prevent updating mod status for options not yet supported by the API (#252)

* Bump to 1.2.3 (#253)

* Bump to 1.2.2 (#250)

* Bump to 1.2.2

* Bump to 1.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Bug Something is broken :(

Development

Successfully merging this pull request may close these issues.

3 participants