Merge pull request #2322 from creeper123123321/passbytebuf

Allow bytebuf passthrough on encode
This commit is contained in:
Myles 2021-02-06 14:25:42 +00:00 committed by GitHub
commit 1998eca6c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -54,8 +54,10 @@ public class BukkitEncodeHandler extends MessageToByteEncoder implements ViaHand
throw (Error) e.getCause();
}
}
} else {
bytebuf.writeBytes((ByteBuf) o);
}
transform(bytebuf);
}

View File

@ -35,8 +35,9 @@ public class SpongeEncodeHandler extends MessageToByteEncoder<Object> implements
throw (Error) e.getCause();
}
}
} else {
bytebuf.writeBytes((ByteBuf) o)
}
transform(bytebuf);
}