EssentialsX / Essentials

The modern Essentials suite for Spigot and Paper.
https://essentialsx.net
GNU General Public License v3.0
1.95k stars 979 forks source link

IncompatibleClassChangeError #5851

Closed ImYenil closed 4 months ago

ImYenil commented 4 months ago

Type of bug

Error in console

/ess dump all output

https://essentialsx.net/dump.html?id=930bdb12556e4f079ddf5b6a693966df

Error log (if applicable)

https://paste.gg/p/anonymous/387f18ae3d2b454d92833042ec0e07a6

Bug description

What happens when you click on any inventory item

Steps to reproduce

just click item

Expected behaviour

This all happens in versions 1.20.4 and lower.

Actual behaviour

X

Additional Information

No response

PukPukov commented 4 months ago

Happens on 1.20.6 also. Not reproduced on 2.21.0-dev+93-3a6fdd9, so bug is from recent builds.

CyberFlameGO commented 4 months ago

This will probably because the latest builds compile against 1.21 which changed some abstract classes to interfaces, and bytecode isn't rewritten for older versions (unlike where if the code was compiled against 1.20.6, the 1.21 server would handle the incompatibility itself)

mbax commented 4 months ago

Correct! You should always build your plugin against the oldest version you wish to support.

CyberFlameGO commented 4 months ago

Yeah - I think there's a clean workaround available in this circumstance though luckily (clean as in without reflection nor changing the API version target). I'll look into it and PR a fix over if it's nothing too huge :)

CyberFlameGO commented 4 months ago

Nevermind for the no reflection thing - turns out there's no suitable substitute for getting the top inventory so I have located a not-too-evil method via SpigotMC's forums (as a side-product of trying to find docs :sob:) which I'll PR over shortly with the rewritten event handling

Omertok767 commented 4 months ago

Hello JRoy, I am reaching out to you because of your Instagram live php script. is it still working? can i learn this