mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Fix finding player network channel with Protocollib and Floodgate
This resolves the deleted ProtocolLib method for newer builds, but uses reflection to find the channel despite the variable name. Fixes #1216
This commit is contained in:
@ -304,7 +304,7 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
NettyChannelInjector injector = (NettyChannelInjector) Accessors.getMethodAccessorOrNull(
|
NettyChannelInjector injector = (NettyChannelInjector) Accessors.getMethodAccessorOrNull(
|
||||||
TemporaryPlayerFactory.class, "getInjectorFromPlayer", Player.class
|
TemporaryPlayerFactory.class, "getInjectorFromPlayer", Player.class
|
||||||
).invoke(null, player);
|
).invoke(null, player);
|
||||||
return injector.getWrappedChannel();
|
return FuzzyReflection.getFieldValue(injector, Channel.class, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user