andylizi / haproxy-detector Goto Github PK
View Code? Open in Web Editor NEWA Minecraft plugin that enables proxied and direct connections both at the same time.
License: GNU Lesser General Public License v3.0
A Minecraft plugin that enables proxied and direct connections both at the same time.
License: GNU Lesser General Public License v3.0
When I start the server with Java16, I encounter this error
[19:31:38 WARN]: Exception encountered when loading plugin: HAProxyDetector
java.lang.NoSuchFieldException: modifiers
at java.lang.Class.getDeclaredField(Class.java:2549) ~[?:?]
at net.andylizi.haproxydetector.bungee.BungeeMain.onEnable(BungeeMain.java:75) ~[?:?]
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:315) ~[waterfall-1.17-448.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:93773f9:448]
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:290) ~[waterfall-1.17-448.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:93773f9:448]
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67) ~[waterfall-1.17-448.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:93773f9:448]
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[waterfall-1.17-448.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:93773f9:448]
Please trouble the author to support Java16, because some plug-ins no longer support the old version of Java in the future
I use translation software, there may be translation errors, sorry
在最新的BungeeCord中(git:BungeeCord-Bootstrap:1.19-R0.1-SNAPSHOT:a0a4fa0:1695)他无法正常工作,使用127.0.0.1连接会提示[/127.0.0.1:4083] <-> InitialHandler - read timed out
不知道是否支持到ProtocolLib的5.1.0版本了,我现在安装插件不加载
java版本: 1.8
minecraft版本: 1.8.9
服务端核心: PaperSpigot
[17:16:53 WARN]: Failed to initialize a channel. Closing: [id: 0xd78baa09, /127.0.0.1:50552 => /127.0.0.1:25565]
java.lang.VerifyError: class io.netty.handler.codec.haproxy.HAProxyMessage overrides final method release.()Z
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_333]
at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_333]
at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_333]
at java.net.URLClassLoader.defineClass(Unknown Source) ~[?:1.8.0_333]
at java.net.URLClassLoader.access$100(Unknown Source) ~[?:1.8.0_333]
at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_333]
at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_333]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_333]
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_333]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:195) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:97) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_333]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_333]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_333]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.tree.ClassTypeSignature.accept(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.tree.ClassTypeSignature.accept(Unknown Source) ~[?:1.8.0_333]
at sun.reflect.generics.repository.ClassRepository.getSuperclass(Unknown Source) ~[?:1.8.0_333]
at java.lang.Class.getGenericSuperclass(Unknown Source) ~[?:1.8.0_333]
at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:106) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:78) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:67) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:57) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at net.andylizi.haproxydetector.bukkit.HAProxyMessageHandler.<init>(HAProxyMessageHandler.java:23) ~[?:?]
at net.andylizi.haproxydetector.bukkit.HAProxyInjectorFactory.inject(HAProxyInjectorFactory.java:56) ~[?:?]
at net.andylizi.haproxydetector.bukkit.HAProxyInjectorFactory.fromChannel(HAProxyInjectorFactory.java:47) ~[?:?]
at com.comphenix.protocol.injector.netty.ProtocolInjector$1.initChannel(ProtocolInjector.java:161) ~[?:?]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:732) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:442) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:412) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:60) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:48) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:64) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.bootstrap.ServerBootstrap$ServerBootstrapAcceptor.channelRead(ServerBootstrap.java:251) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at com.comphenix.protocol.injector.netty.ProtocolInjector$3.channelRead(ProtocolInjector.java:187) [ProtocolLib.jar:4.8.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:92) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_333]
[17:16:53 WARN]: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NullPointerException
at net.minecraft.server.v1_8_R3.NetworkManager.close(NetworkManager.java:245) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at net.minecraft.server.v1_8_R3.NetworkManager.channelInactive(NetworkManager.java:105) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:228) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:228) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.handler.timeout.ReadTimeoutHandler.channelInactive(ReadTimeoutHandler.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:769) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.AbstractChannel$AbstractUnsafe$5.run(AbstractChannel.java:567) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_333]
去除haproxy-detector就没有问题了
所有插件版本都试过了,一样的结果
可以支持 ProtocolLib 5.0 吗?
其他插件需要新的ProtocolLib才能运行, 我无法再使用4.7版本
[00:08:35 INFO]: [ProtocolLib] Loading ProtocolLib v5.0.0-SNAPSHOT-b554
[00:08:36 INFO]: [HAProxyDetector] Loading HAProxyDetector v3.0.1
[00:08:36 INFO]: [ProtocolLib] Enabling ProtocolLib v5.0.0-SNAPSHOT-b554
[00:08:36 INFO]: [ProtocolLib] Started structure compiler thread.
[00:08:36 INFO]: [HAProxyDetector] Enabling HAProxyDetector v3.0.1*
[00:08:36 ERROR]: Error occurred while enabling HAProxyDetector v3.0.1 (Is it up to date?)
java.lang.NoClassDefFoundError: com/comphenix/protocol/injector/netty/ProtocolInjector
at net.andylizi.haproxydetector.bukkit.BukkitMain.onEnable(BukkitMain.java:59) ~[haproxy-detector-3.0.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Purpur-1428]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Purpur-1428]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Purpur-1428]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:561) ~[patched_1.17.1.jar:git-Purpur-1428]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:475) ~[patched_1.17.1.jar:git-Purpur-1428]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[patched_1.17.1.jar:git-Purpur-1428]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1233) ~[patched_1.17.1.jar:git-Purpur-1428]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322) ~[patched_1.17.1.jar:git-Purpur-1428]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.injector.netty.ProtocolInjector
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:153) ~[patched_1.17.1.jar:git-Purpur-1428]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:105) ~[patched_1.17.1.jar:git-Purpur-1428]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
... 10 more
[00:08:36 INFO]: [HAProxyDetector] Disabling HAProxyDetector v3.0.1
在服务器中如果只启用spigot.yml的bungeecord = true将无法连接到服务器,提示无法连接至If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
如果启用paper.yml中的proxy-protocol选项也将无法进入服务器,提示ReadTimeOut且下游服务器没有任何实质性的响应
我在想这属不属于一个反向代理的逻辑BUG?
在1.12.2 Spigot服务端上的spigot.yml并没有ip_forward选项,导致了HAProxyDetector无法正常工作,请问我该怎么做?
Tips:已经开启了BungeeCord选项
[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)!
我在Velocity里同时使用您的插件和Geyser-Velocity时出现了问题,看出来您的插件无法和Geyser-Velocity一起工作
我想可能是udp不兼容的问题?最后感谢您的回复 ;)
如题,启动时报错,Openjdk 18
以下为报错抛出的异常
21:24:14 [警告] Exception encountered when loading plugin: HAProxyDetector
java.lang.InternalError: java.lang.IllegalAccessException: static final field has no write access: net.md_5.bungee.netty.PipelineUtils.SERVER_CHILD/io.netty.channel.ChannelInitializer/putStatic, from class java.lang.Object (module java.base)
at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newFieldAccessor(MethodHandleAccessorFactory.java:167)
at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:176)
at java.base/java.lang.reflect.Field.acquireOverrideFieldAccessor(Field.java:1184)
at java.base/java.lang.reflect.Field.getOverrideFieldAccessor(Field.java:1153)
at java.base/java.lang.reflect.Field.get(Field.java:428)
at net.andylizi.haproxydetector.bungee.BungeeMain.onEnable(BungeeMain.java:102)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
Caused by: java.lang.IllegalAccessException: static final field has no write access: net.md_5.bungee.netty.PipelineUtils.SERVER_CHILD/io.netty.channel.ChannelInitializer/putStatic, from class java.lang.Object (module java.base)
at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:955)
at java.base/java.lang.invoke.MethodHandles$Lookup.unreflectField(MethodHandles.java:3494)
at java.base/java.lang.invoke.MethodHandles$Lookup.unreflectSetter(MethodHandles.java:3485)
at java.base/java.lang.invoke.MethodHandleImpl$1.unreflectField(MethodHandleImpl.java:1637)
at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newFieldAccessor(MethodHandleAccessorFactory.java:145)
... 9 more
The way velocity handle HAproxy is same as the Bungeecord,direct/proxy can not work at same time either.
Add a command with which you can find out through which proxy server the player is connected.
I'm using spigot 1.20.4 w/ latest dev build from here.
Here is the error log:
[13:23:30] [Server thread/ERROR]: Error occurred while enabling HAProxyDetector v3.1.0-SNAPSHOT (Is it up to date?)
java.lang.NoClassDefFoundError: com/comphenix/protocol/ProtocolLibrary
at net.andylizi.haproxydetector.bukkit.BukkitMain.onEnable(BukkitMain.java:51) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:539) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4021-Spigot-864e4ac-fb97348]
at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:453) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4021-Spigot-864e4ac-fb97348]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:220) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4021-Spigot-864e4ac-fb97348]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1000) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4021-Spigot-864e4ac-fb97348]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4021-Spigot-864e4ac-fb97348]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.ProtocolLibrary
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:160) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:112) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
... 10 more
[18:07:42] [Server thread/INFO]: [ProtocolLib] Enabling ProtocolLib v5.3.0-SNAPSHOT-726
[18:07:42] [Server thread/INFO]: [HAProxyDetector] Enabling HAProxyDetector v3.0.2
[18:07:42] [Server thread/ERROR]: Error occurred while enabling HAProxyDetector v3.0.2 (Is it up to date?)
java.lang.NoClassDefFoundError: com/comphenix/protocol/injector/netty/ProtocolInjector
at net.andylizi.haproxydetector.bukkit.BukkitMain.onEnable(BukkitMain.java:54) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_21_R1.CraftServer.enablePlugin(CraftServer.java:567) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
at org.bukkit.craftbukkit.v1_21_R1.CraftServer.enablePlugins(CraftServer.java:481) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:237) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1017) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.injector.netty.ProtocolInjector
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:160) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:112) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
... 10 more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.