Im using the latest version of ReflectionHelper(1.15.2-SNAPSHOT) and Spigot 1.12.2, using Minecraft.Version.getVersion() throws a NullPointerException
Caused by: java.lang.RuntimeException: Failed to get version at org.inventivetalent.reflection.minecraft.MinecraftVersion.<clinit>(MinecraftVersion.java:16) ~[?:?] ... 18 more Caused by: java.lang.NullPointerException at org.inventivetalent.reflection.minecraft.Minecraft$Version.values(Minecraft.java:94) ~[?:?] at org.inventivetalent.reflection.minecraft.MinecraftVersion.getVersion(MinecraftVersion.java:93) ~[?:?] at org.inventivetalent.reflection.minecraft.MinecraftVersion.<clinit>(MinecraftVersion.java:14) ~[?:?]
Additional context
The function is called in onEnable function as it needed to load some things, in the version 1.14 of ReflectionHelper this doesnt happen
Apparently is caused because the enum is not initialized (Java 11 things), i make it work calling MinecraftVersion.getVersion() at start and before the call to Minecraft.Version.getVersion(), weird
Im using the latest version of ReflectionHelper(1.15.2-SNAPSHOT) and Spigot 1.12.2, using Minecraft.Version.getVersion() throws a NullPointerException
Caused by: java.lang.RuntimeException: Failed to get version at org.inventivetalent.reflection.minecraft.MinecraftVersion.<clinit>(MinecraftVersion.java:16) ~[?:?] ... 18 more Caused by: java.lang.NullPointerException at org.inventivetalent.reflection.minecraft.Minecraft$Version.values(Minecraft.java:94) ~[?:?] at org.inventivetalent.reflection.minecraft.MinecraftVersion.getVersion(MinecraftVersion.java:93) ~[?:?] at org.inventivetalent.reflection.minecraft.MinecraftVersion.<clinit>(MinecraftVersion.java:14) ~[?:?]
Additional context The function is called in onEnable function as it needed to load some things, in the version 1.14 of ReflectionHelper this doesnt happen