snowgears / shopbugs

Shop bug tracker
8 stars 4 forks source link

[BUG] java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 #426

Closed MADrewry closed 2 months ago

MADrewry commented 4 months ago

Is there an existing issue for this?

Type of bug

Error in console

Environment

- Server Version: Paper 1.20.6-137-master@bd5867a
- Shop Version: 1.8.4.7

Server startup log

https://paste.gg/p/anonymous/6e7319dc2e6448c8809a3447957b5ab3

Shop config files

https://paste.gg/p/anonymous/96a31fc46742468287cbcd75dc2f635e

Error log (if applicable)

No response

Bug description

When Shop attempts to enable it causes error: [Server thread/ERROR]: Error occurred while enabling Shop v1.8.4.7 (Is it up to date?) java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3

Steps to reproduce

Put Shop 1.8.4.7 plugin in plugins directory Start minecaft server

Expected behaviour

Shop plugin should load and enable successfully

Actual behaviour

Shop causes error and does not enable

Other information

JaydenJinx commented 4 months ago

Same issue on Paper version 1.20.6-137-master@bd5867a. Shop version 1.8.4.7.

HammontreeArt commented 4 months ago

I'm getting the same bug.

[00:59:58 ERROR]: Error occurred while enabling Shop v1.8.4.7 (Is it up to date?) java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 at Shop-1.8.4.7.jar/com.snowgears.shop.util.NMSBullshitHandler.init(NMSBullshitHandler.java:28) ~[Shop-1.8.4.7.jar:?] at Shop-1.8.4.7.jar/com.snowgears.shop.util.NMSBullshitHandler.(NMSBullshitHandler.java:21) ~[Shop-1.8.4.7.jar:?] at Shop-1.8.4.7.jar/com.snowgears.shop.Shop.onEnable(Shop.java:184) ~[Shop-1.8.4.7.jar:?]

config.txt 20240612_ShopPlugin_IndexOutofRange.txt

OstlerDev commented 4 months ago

Same issue with Paper 1.21 Experimental

OstlerDev commented 4 months ago

Looks like the issue is with Paper itself changing how files are allowed to be loaded internally, the author posted this update over on the Spigot plugin page.

Paper introduced a major limitation in 1.20.5/6. Plugins can no longer load files at runtime or check the Minecraft version which is how shop loads the correct file versions.

https://www.spigotmc.org/threads/shop-the-intuitive-shop-plugin-paid.79064/page-168#post-4739435

OstlerDev commented 2 months ago

This issue has been fixed in Shop 1.9.0.0