Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception encountered when loading plugin: AuthMeBungee #4

Closed
puigru opened this issue Aug 4, 2017 · 4 comments
Closed

Exception encountered when loading plugin: AuthMeBungee #4

puigru opened this issue Aug 4, 2017 · 4 comments
Assignees

Comments

@puigru
Copy link

puigru commented Aug 4, 2017

When using AuthMeBungee on the latest version of Bungee I keep getting this exception in the console, the plugin itself seems to work just fine but the config is not being created.

14:28:35 [ADVERTENCIA] Exception encountered when loading plugin: AuthMeBungee
ch.jalu.injector.exceptions.InjectorException: Class 'class ch.jalu.configme.SettingsManager' with package 'ch.jalu.configme' is outside of the allowed packages. It must be provided explicitly or the package must be passed to the constructor.
at ch.jalu.injector.handlers.preconstruct.PreConstructPackageValidator.process(PreConstructPackageValidator.java:35)
at ch.jalu.injector.handlers.preconstruct.PlainPreConstructHandler.accept(PlainPreConstructHandler.java:11)
at ch.jalu.injector.InjectorImpl.processPreConstructorHandlers(InjectorImpl.java:244)
at ch.jalu.injector.InjectorImpl.get(InjectorImpl.java:157)
at ch.jalu.injector.InjectorImpl.getSingleton(InjectorImpl.java:51)
at fr.xephi.authmebungee.bungeecord.AuthMeBungee.onEnable(AuthMeBungee.java:37)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:227)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:273)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:55)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)

@sgdc3 sgdc3 self-assigned this Aug 4, 2017
@sgdc3
Copy link
Member

sgdc3 commented Aug 4, 2017

@ljacqu relocation related issue?

@ljacqu
Copy link
Member

ljacqu commented Aug 5, 2017

@sgdc3 This occurs when the injector is configured with a given package and we try to instantiate a class outside of that package.

In AuthMeBungeeSpigot:

injector = new InjectorBuilder().addDefaultHandlers("fr.xephi.authmebungee.spigot").create();

You can fix this in different ways:
a) Don't limit what package can be instantiated, i.e. new InjectorBuilder().addDefaultHandlers("").create()
b) Extend SettingsManager inside the fr.xephi.auhtmebungee package and use that class instead of ConfigMe's SettingsManager
c) Register the object in the injector immediately, i.e. instead of injector.registerProvider(SettingsManager.class, SpigotSettingsProvider.class); use injector.register(SettingsManager.class, settingsManager) where settingsManager is the object you've created beforehand

@sgdc3
Copy link
Member

sgdc3 commented Aug 5, 2017

Ok, thank you, i'll fix that asap

@puigru puigru mentioned this issue Aug 21, 2017
@sgdc3
Copy link
Member

sgdc3 commented Aug 22, 2017

Thank you, @XXLuigiMario i'm very busy atm, i completely forgot about that.

@sgdc3 sgdc3 closed this as completed Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants