NBTINJECTOR not working.
nolifejavadeveloper opened this issue ยท 9 comments
[19:35:57 ERROR]: [?]de.tr7zw.nbtapi.NbtApiException: [?]Exception while injecting XPOrb initializing EntityCore v1.0-SNAPSHOT (Is it up to date?)
de.tr7zw.nbtapi.NbtApiException: [?]de.tr7zw.nbtapi.NbtApiException: [?]Exception while injecting XPOrb
at de.tr7zw.nbtinjector.NBTInjector.inject(NBTInjector.java:81) ~[?:?]
at net.craftanvil.gravelgrotto.EntityCore.onLoad(EntityCore.java:15) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:297) [spigot-1.8.8.jar:git-Spigot-21fe707-741a1bd]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot-1.8.8.jar:git-Spigot-21fe707-741a1bd]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8.jar:git-Spigot-21fe707-741a1bd]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: de.tr7zw.nbtapi.NbtApiException: [?]Exception while injecting XPOrb
at de.tr7zw.nbtinjector.InternalInjectors.entity1v10Below(InternalInjectors.java:95) ~[?:?]
at de.tr7zw.nbtinjector.NBTInjector.inject(NBTInjector.java:63) ~[?:?]
... 5 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @5244914f
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
at java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[?:?]
at java.lang.reflect.Method.setAccessible(Method.java:193) ~[?:?]
at de.tr7zw.nbtinjector.javassist.util.proxy.SecurityActions.setAccessible(SecurityActions.java:159) ~[?:?]
at de.tr7zw.nbtinjector.javassist.util.proxy.DefineClassHelper$JavaOther.defineClass(DefineClassHelper.java:213) ~[?:?]
at de.tr7zw.nbtinjector.javassist.util.proxy.DefineClassHelper$Java11.defineClass(DefineClassHelper.java:52) ~[?:?]
at de.tr7zw.nbtinjector.javassist.util.proxy.DefineClassHelper.toClass(DefineClassHelper.java:260) ~[?:?]
at de.tr7zw.nbtinjector.javassist.ClassPool.toClass(ClassPool.java:1240) ~[?:?]
at de.tr7zw.nbtinjector.javassist.CtClass.toClass(CtClass.java:1392) ~[?:?]
at de.tr7zw.nbtinjector.ClassGenerator.wrapNbtClass(ClassGenerator.java:100) ~[?:?]
at de.tr7zw.nbtinjector.ClassGenerator.wrapEntity(ClassGenerator.java:161) ~[?:?]
at de.tr7zw.nbtinjector.InternalInjectors.entity1v10Below(InternalInjectors.java:88) ~[?:?]
at de.tr7zw.nbtinjector.NBTInjector.inject(NBTInjector.java:63) ~[?:?]
... 5 more
- It is on onLoad.
- Version: 1.8.8
This feature is not really supported anymore. It doesn't seem to work with newer java versions without applying the opens flags to the jvm args like mentioned in the log.
Not on 1.8 with Java 17 and without adding the JVM Flag for it.
1.14+ supports it without any hacks like nbt-injector, and with java 8 the nbt-injector will probably work, while unsupported from my end.
JVM Flag? Can you explain more on that please? Do I just add something on the start BAT file?
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @5244914f
--add-opens java.base/java.lang=ALL-UNNAMED
but at this point you are 2 layers deep in unsupported land since 1.8 is just too old.
Ah, so, is there another way of adding custom NBTs to entities without using unsupported things...
Update to 1.14+ (1.16, 1.18, 1.19, whatever). Bellow that version, spigot just doesn't support it without unsupported, horrible hacks.
The unsupported method worked! Thank you so much for making this amazing API and the amazing support!