InteractiveChat icon indicating copy to clipboard operation
InteractiveChat copied to clipboard

[1.21.5Folia]NullPointerException in onEnable(): protocolPlatform is null

Open kitamaruramito opened this issue 7 months ago • 1 comments

Summary When starting InteractiveChat v4.3.0.0 on a Folia-based 1.21.5 server, the plugin fails to detect the platform and leaves the protocolPlatform field uninitialized, resulting in a NullPointerException during onEnable(). This prevents the plugin from loading on the backend, even though the same JAR is deployed on both the proxy and backend.

Reproduction Steps Deploy InteractiveChat.jar (v4.3.0.0) to your Velocity proxy’s plugins/ directory.

Deploy the same InteractiveChat.jar to your Folia server’s plugins/ directory (with ProtocolLib, PlaceholderAPI, and Vault also installed).

Start the Folia server.

Observe the following in the console:

[21:43:36 INFO]: [InteractiveChat] Enabling InteractiveChat v4.3.0.0 [21:43:48 ERROR]: Error occurred while enabling InteractiveChat v4.3.0.0 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "com.loohp.interactivechat.platform.ProtocolPlatform.getClass()" because "com.loohp.interactivechat.InteractiveChat.protocolPlatform" is null at InteractiveChat-4.3.0.0.jar/com.loohp.interactivechat.InteractiveChat.onEnable(InteractiveChat.java:449) … (stack trace continues) … [21:43:48 INFO]: [InteractiveChat] Disabling InteractiveChat v4.3.0.0 Expected Behavior InteractiveChat should recognize Folia as a supported platform, initialize protocolPlatform appropriately (e.g. Using SpigotPlatform or a dedicated FoliaPlatform), and complete its enable routine without errors.

Actual Behavior protocolPlatform remains null, causing a NullPointerException and immediate plugin disable.

Environment Plugin Version: InteractiveChat v4.3.0.0

Server Software: Folia 1.21.5

Proxy: Velocity (latest stable)

Backend Dependencies:

ProtocolLib (latest)

PlaceholderAPI (latest)

Vault (latest)

Additional Information Confirmed that the JAR checksum is identical on both proxy and Folia backend.

No other errors or conflicts before the NPE.

A minimal test setup (only InteractiveChat + required dependencies) reliably reproduces this issue.

kitamaruramito avatar May 17 '25 21:05 kitamaruramito