When loading the library on a fresh Paper/Purpur 1.21.3 server, it fails to initialize and then returns this error:
[GlowingEntities] Found server version 1.21.3
[GlowingEntities] Loaded transparent mappings.
[GlowingEntities] Glowing Entities reflection failed to initialize. The util is disabled. Please ensure your version (1.21.3-R0.1-SNAPSHOT) is supported.
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:72) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
at BlissGems-2.0.0-ALPHA.jar/fr.skytasul.reflection.TransparentReflectionAccessor$TransparentConstructor.newInstance(TransparentReflectionAccessor.java:157) ~[BlissGems-2.0.0-ALPHA.jar:?]
at BlissGems-2.0.0-ALPHA.jar/com.blissgems.quickmc.glowingentities.GlowingEntities$Packets.loadReflection(GlowingEntities.java:447) ~[BlissGems-2.0.0-ALPHA.jar:?]
at BlissGems-2.0.0-ALPHA.jar/com.blissgems.quickmc.glowingentities.GlowingEntities$Packets.initialize(GlowingEntities.java:421) ~[BlissGems-2.0.0-ALPHA.jar:?]
at BlissGems-2.0.0-ALPHA.jar/com.blissgems.quickmc.glowingentities.GlowingEntities$Packets.ensureInitialized(GlowingEntities.java:366) ~[BlissGems-2.0.0-ALPHA.jar:?]
at BlissGems-2.0.0-ALPHA.jar/com.blissgems.quickmc.glowingentities.GlowingEntities.<init>(GlowingEntities.java:58) ~[BlissGems-2.0.0-ALPHA.jar:?]
at BlissGems-2.0.0-ALPHA.jar/com.blissgems.quickmc.QuickMC.init(QuickMC.java:67) ~[BlissGems-2.0.0-ALPHA.jar:?]
at BlissGems-2.0.0-ALPHA.jar/com.blissgems.BlissGems.onEnable(BlissGems.java:191) ~[BlissGems-2.0.0-ALPHA.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-api-1.21.3-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.3.jar:1.21.3-63-4190ee7]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.Level.paperConfig()" because "world" is null
at net.minecraft.world.entity.Entity.<init>(Entity.java:618) ~[paper-1.21.3.jar:1.21.3-63-4190ee7]
at net.minecraft.world.entity.Marker.<init>(Marker.java:18) ~[paper-1.21.3.jar:1.21.3-63-4190ee7]
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
... 21 more
After experimenting, I've found the error is due to passing in a null World when initializing reflection and creating the markerEntity variable.
This was my working solution, the code is a bit rough:
When loading the library on a fresh Paper/Purpur 1.21.3 server, it fails to initialize and then returns this error:
After experimenting, I've found the error is due to passing in a null World when initializing reflection and creating the markerEntity variable.
This was my working solution, the code is a bit rough: