From a748a9519753953c2a3068b4b225d73da004f855 Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Thu, 1 Jan 2015 13:53:46 -0500 Subject: [PATCH] Fix a few errors with injection --- .../comphenix/protocol/injector/netty/ChannelInjector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java index 8ab08bdb..28dea810 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java @@ -600,7 +600,7 @@ class ChannelInjector extends ByteToMessageDecoder implements Injector { */ private void disconnect(String message) { // If we're logging in, we can only close the channel - if (playerConnection == null || player instanceof Factory) { + if (playerConnection == null || player.get() instanceof Factory) { originalChannel.disconnect(); } else { // Call the disconnect method @@ -632,7 +632,7 @@ class ChannelInjector extends ByteToMessageDecoder implements Injector { private void invokeSendPacket(Object packet) { // Attempt to send the packet with NetworkMarker.handle(), or the PlayerConnection if its active try { - if (player instanceof Factory) { + if (player.get() instanceof Factory) { MinecraftMethods.getNetworkManagerHandleMethod().invoke(networkManager, packet, new GenericFutureListener[0]); } else { MinecraftMethods.getSendPacketMethod().invoke(getPlayerConnection(), packet);