forked from TuxCoding/FastLogin
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(
|
||||
TemporaryPlayerFactory.class, "getInjectorFromPlayer", Player.class
|
||||
).invoke(null, player);
|
||||
return injector.getWrappedChannel();
|
||||
return FuzzyReflection.getFieldValue(injector, Channel.class, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user