WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@HaHaWTH
Copy link

@HaHaWTH HaHaWTH commented Nov 3, 2025

Closes #546.

ChestShop doesn't specify AuthMe as a softdepend in plugin.yml, which causes the plugin load order cannot be determined and leads to a NoClassDefFoundError.

@Phoenix616
Copy link
Member

Phoenix616 commented Nov 3, 2025

Can you please explain how this solves the linked issue? Because as far as I know this should not be necessary as soft-depend is for determining the order, the classes should still be accessible even if AuthMe should load after ChestShop. (Or do you intend to fix a different issue? Because I could imagine that the AuthMe listener code indeed fails to even register like it is written now if AuthMe does not enable it before because there is an isEnabled check there but ideally the solution for that would not be to have a soft-dependency screwing with the load-order but register the listener when AuthMe is detected enabling similar to how other dependencies are done. Granted setting it as a soft-dependency might still be good, but there is no guarantee that soft-dependencies enable before the plugin anyways in case of circular dependencies so a listener on plugin enable would be required still)

Also please reduce the diff to only the necessary change, not additional line ending changes.

@HaHaWTH HaHaWTH force-pushed the fix/authme-load-order branch from a97642d to 488129a Compare November 3, 2025 14:28
@HaHaWTH
Copy link
Author

HaHaWTH commented Nov 3, 2025

This change resolves this error, theoretically the current version of ChestShop on Paper 1.21.8 won't cause this. But Paper's class loader isolation preventing accessing classes of oher plugins without depending on it (Only when the plugin uses paper-plugin.yml manifest, but ChestShop doesn't), however leaving AuthMe as a softdepend in plugin manifest is always a good practice, this is my opinion.

Also, when I tested on the environment that is used in #546, the ClassNotFoundException gets resolved by adding a softdepend.

@Phoenix616
Copy link
Member

Ok, it's weird that it would cause that error but good to know you saw it too and this solved it. However the fact remains that this might still cause issues when the load order is not respected (which is not guaranteed by the soft-dependency system) and AuthMe should be moved to use ChestShop's Dependencies class too. (not sure why it wasn't in the first place tbh.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AuthMe old version

2 participants