Archiviert
13
0

Fix a few errors with injection

Dieser Commit ist enthalten in:
Dan Mulloy 2015-01-01 13:53:46 -05:00
Ursprung 79da4f92a1
Commit a748a95197

Datei anzeigen

@ -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);