NamelessMC/Nameless-Plugin

Missing velocity annotation processor

Closed this issue · 5 comments

I tried to fix it myself, but there are too many errors, could you update it?

Velocity 3.1.2-SNAPSHOT (git-d59d4505-b133)

com.velocitypowered.api.plugin.InvalidPluginException: Did not find a valid velocity-plugin.json.
        at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.loadCandidate(JavaPluginLoader.java:64) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:92) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:325) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:223) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.Velocity.main(Velocity.java:64) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
[06:44:56 ERROR]: Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mattmx/announcer/Announcer has been compiled by a more recent version of the Java Runtime (class file version 58.0), this version of the Java Runtime only recognizes class file versions up to 55.0
[06:44:56 ERROR]:       at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[06:44:56 ERROR]:       at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[06:44:56 ERROR]:       at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[06:44:56 ERROR]:       at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
[06:44:56 ERROR]:       at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
[06:44:56 ERROR]:       at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
[06:44:56 ERROR]:       at java.base/java.security.AccessController.doPrivileged(Native Method)
[06:44:56 ERROR]:       at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
[06:44:56 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:68)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:62)
[06:44:56 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.createPluginFromCandidate(JavaPluginLoader.java:88)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:121)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:325)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:223)
[06:44:56 ERROR]:       at com.velocitypowered.proxy.Velocity.main(Velocity.java:64)

This error message seems to be for an unrelated plugin (com/mattmx/announcer/Announcer)? It says that plugin requires java >14 but you are using java 11

I'm sorry, I posted the wrong error.

[09:30:05 ERROR]: Unable to load plugin plugins/Nameless-Plugin-Velocity-3.0.0-beta.jar
com.velocitypowered.api.plugin.InvalidPluginException: Did not find a valid velocity-plugin.json.
        at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.loadCandidate(JavaPluginLoader.java:64) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:92) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:325) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:223) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.Velocity.main(Velocity.java:64) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]

Creating velocity-plugin.json didn't solve the problem.

Thanks for the bug report, this should be fixed with a0db0ad

As I said, there is an error even after creating the velocity-plugin

com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingConstructor]: IllegalArgumentException: VelocityNamelessPlugin does not have a container.
  at VelocityNamelessPlugin.<init>(VelocityNamelessPlugin.java:32)
  at VelocityPluginModule.configure(VelocityPluginModule.java:48)
  while locating VelocityNamelessPlugin

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

1 error

======================
Full classname legend:
======================
VelocityNamelessPlugin:   "com.namelessmc.plugin.velocity.VelocityNamelessPlugin"
VelocityPluginModule:     "com.velocitypowered.proxy.plugin.loader.java.VelocityPluginModule"
========================
End of classname legend:
========================

        at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1103) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.createPlugin(JavaPluginLoader.java:121) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:151) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:325) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:223) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.Velocity.main(Velocity.java:64) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
Caused by: java.lang.IllegalArgumentException: com.namelessmc.plugin.velocity.VelocityNamelessPlugin does not have a container.
        at com.velocitypowered.api.plugin.PluginManager.lambda$ensurePluginContainer$0(PluginManager.java:69) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
        at com.velocitypowered.api.plugin.PluginManager.ensurePluginContainer(PluginManager.java:69) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.velocitypowered.proxy.event.VelocityEventManager.register(VelocityEventManager.java:343) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.namelessmc.plugin.velocity.VelocityNamelessPlugin.<init>(VelocityNamelessPlugin.java:42) ~[?:?]
        at com.namelessmc.plugin.velocity.VelocityNamelessPlugin$$FastClassByGuice$$4605775.GUICE$TRAMPOLINE(<generated>) ~[?:?]
        at com.namelessmc.plugin.velocity.VelocityNamelessPlugin$$FastClassByGuice$$4605775.apply(<generated>) ~[?:?]
        at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100) ~[velocity.jar:3.1.2-SNAPSHOT (git-d59d4505-b133)]
        ... 6 more
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsString()" because the return value of "com.google.gson.JsonObject.get(String)" is null
        at com.namelessmc.plugin.lib.nameless-api.Website.<init>(Website.java:45) ~[?:?]
        at com.namelessmc.plugin.lib.nameless-api.NamelessAPI.getWebsite(NamelessAPI.java:83) ~[?:?]
        at com.namelessmc.plugin.common.ApiProvider.api(ApiProvider.java:94) ~[?:?]
        at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$1(VelocityScheduler.java:203) ~[velocity.jar:3.1.2-SNAPSHOT (git-3ae93875-b138)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
>