andylizi / haproxy-detector

A Minecraft plugin that enables proxied and direct connections both at the same time.
GNU Lesser General Public License v3.0
68 stars 10 forks source link

Can't create plugin haproxy-detector #14

Open Hanmingxuan opened 2 weeks ago

Hanmingxuan commented 2 weeks ago
[12:45:55 INFO]: Booting up Velocity 3.3.0-SNAPSHOT (git-350ea7f3-b398)...
[12:45:55 INFO]: Loading localizations...
[12:45:56 INFO]: Connections will use NIO channels, Java compression, Java ciphers
[12:45:56 WARN]: Player info forwarding is disabled! All players will appear to be connecting from the proxy and will have offline-mode UUIDs.
[12:45:56 INFO]: Loading plugins...
[12:45:56 ERROR]: Can't create plugin haproxy-detector
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/MissingImplementation]: No implementation for Logger was bound.

Requested by:
1  : VelocityMain.<init>(VelocityMain.java:41)
      \_ for 2nd parameter
     at VelocityPluginModule.configure(VelocityPluginModule.java:47)

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

1 error

======================
Full classname legend:
======================
Logger:               "net.andylizi.haproxydetector.log.Logger"
VelocityMain:         "net.andylizi.haproxydetector.velocity.VelocityMain"
VelocityPluginModule: "com.velocitypowered.proxy.plugin.loader.java.VelocityPluginModule"
========================
End of classname legend:
========================

        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:589) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.google.inject.Guice.createInjector(Guice.java:87) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.google.inject.Guice.createInjector(Guice.java:69) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.google.inject.Guice.createInjector(Guice.java:59) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.createPlugin(JavaPluginLoader.java:129) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:155) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:362) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:239) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.Velocity.main(Velocity.java:71) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
[12:45:56 INFO]: Loaded 0 plugins
[12:45:56 INFO]: Listening on /[0:0:0:0:0:0:0:0]:25565
[12:45:56 INFO]: Done (0.49s)!
andylizi commented 2 weeks ago

奇怪,这种问题不该出现才对。除了 haproxy-detector 以外,别的 Velocity 插件能正常加载吗?根据这个报错,我怀疑所有插件都会加载失败。

Hanmingxuan commented 2 weeks ago

在github上找了一个你的fork 版本3.2.0可以用

Hanmingxuan commented 2 weeks ago

要不你也更一下?都1.21了 哈哈

andylizi commented 2 weeks ago

你指的具体是哪个版本,可以给一下链接嘛。

Hanmingxuan commented 2 weeks ago

https://papermc.io/downloads/velocity 最新版 和你的3.1.0

andylizi commented 2 weeks ago

啊,原来如此。这个报错是 3.1.0-SNAPSHOT 引入的 bug,但 3.1.0 的代码我还没提交到 GitHub 上来,所以我之前看的时候没看出问题。

3.1.0-SNAPSHOT 和 3.0.2 的唯一区别就是新版本 ProtocolLib 的支持,只影响 Bukkit 平台,对 Velocity 来说是没有区别的。因此你直接下载 3.0.2 就可以了。