funkemunky / AntiVPN

An antivpn utilizing the funkemunky API
Apache License 2.0
21 stars 7 forks source link

1.7 version not working on Velocity #20

Closed Dagrond closed 2 years ago

Dagrond commented 2 years ago

`[08:52:12] [main/ERROR]: Can't create plugin kaurivpn com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/MissingConstructor]: No injectable constructor for type VelocityPlugin.

class VelocityPlugin does not have a @Inject annotated constructor or a no-arg constructor.

Requested by: 1 : VelocityPlugin.class(VelocityPlugin.java:29) at VelocityPluginModule.configure(VelocityPluginModule.java:48)

Learn more: https://github.com/google/guice/wiki/MISSING_CONSTRUCTOR

1 error

====================== Full classname legend:

VelocityPlugin: "dev.brighten.antivpn.velocity.VelocityPlugin" VelocityPluginModule: "com.velocitypowered.proxy.plugin.loader.java.VelocityPluginModule"

End of classname legend:

at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:568) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.google.inject.Guice.createInjector(Guice.java:87) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.google.inject.Guice.createInjector(Guice.java:69) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.google.inject.Guice.createInjector(Guice.java:59) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.createPlugin(JavaPluginLoader.java:119) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:151) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:324) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:222) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]
at com.velocitypowered.proxy.Velocity.main(Velocity.java:64) ~[velocity-3.1.2-SNAPSHOT-122.jar:3.1.2-SNAPSHOT (git-f0ea638f-b122)]`

Also tried on stable version of Velocity with the same results.

Strahilchu commented 2 years ago

https://pastebin.com/H4w8B9K6 Having similar issue on 1.18.2

funkemunky commented 2 years ago

I have noticed the issue when testing with vanilla Velocity. It didn't pop up in testing due to my usual testing setup not producing the problem, even with Velocity 3.1.2. Fixed in commit: https://github.com/funkemunky/AntiVPN/commit/314e554ce07d62fd21da481b5f8ca943760c4b87

This was caused by the change of shading my resources in a different directory, and anything com.google got changed to dev.brighten.antivpn.utils.shaded.com.google, which Velocity did not like.