CobbleSword / NachoSpigot

NachoSpigot is a fork of TacoSpigot 1.8.9 that offers several enhancements to performance as well as bug fixes.
GNU General Public License v3.0
237 stars 86 forks source link

Update Guava and GSON #323

Closed ghost closed 2 years ago

ghost commented 2 years ago

Updates guava and gson to the latest versions

Closes #322

Todo List:

Dysaido commented 2 years ago

If you want to upgrade the guava, when the worldguard crashes, because it can't find some import from guava.

ghost commented 2 years ago

Like @Dysaido said, if you wan't to update guava you should fix the compatibilities issues with plugins like WG

Sneakometer commented 2 years ago

Can confirm this works like a charm with

right out of the box.

Great job!

Edit: I see the GuavaInjector is failing on jre 17. Maybe also add a toggle for this in config? Thanks!

ghost commented 2 years ago

Can confirm this works like a charm with

  • NoCheatPlus
  • CloudNet Bridge
  • ViaVersion
  • Multiverse Core
  • Luckperms
  • WorldEdit
  • Plotme/squared
  • ArmorStandTools
  • IllegalStack
  • DecoHeads
  • All of our custom plugins

right out of the box.

Great job!

Edit: I see the GuavaInjector is failing on jre 17. Maybe also add a toggle for this in config? Thanks!

Can you send the error of GuavaInjector on Java 17?

ghost commented 2 years ago

Can you send the error of GuavaInjector on Java 17?

It’s the same as #211 but with the GuavaInjector class instead of javassist

It caused by line 20 in the GuavaInjector class: https://github.com/CobbleSword/NachoSpigot/blob/f03ddd8b395a6f2da8abf8366d1adc9854171912/NachoSpigot-Server/src/main/java/dev/cobblesword/nachospigot/GuavaInjector.java#L20

Sneakometer commented 2 years ago

Can you send the error of GuavaInjector on Java 17?

In case it's still needed:

[18:21:50] [Server thread/ERROR]: Exception while defining class
java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3cb1ffe6
    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 dev.cobblesword.nachospigot.GuavaInjector.defineClass(GuavaInjector.java:20) [paper.jar:git-NachoSpigot-f03ddd8]
    at dev.cobblesword.nachospigot.GuavaInjector.<clinit>(GuavaInjector.java:37) [paper.jar:git-NachoSpigot-f03ddd8]
    at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:209) [paper.jar:git-NachoSpigot-f03ddd8]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:559) [paper.jar:git-NachoSpigot-f03ddd8]
    at java.lang.Thread.run(Thread.java:833) [?:?]
Sculas commented 2 years ago

Thanks a lot @Elierrr for this PR! Sadly I do not have the time to test this to be sure, but I guess it should be fine. :)