Update paperweight to 1.2.0 (#6901)

This commit is contained in:
Jason Penilla
2021-11-16 21:00:14 -08:00
parent 63c3c76ad0
commit a9214f2d63
13 changed files with 45 additions and 81 deletions

View File

@@ -91,11 +91,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
private void doSendPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener, ConnectionProtocol enumprotocol, ConnectionProtocol enumprotocol1) {
private void doSendPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> callback, ConnectionProtocol enumprotocol, ConnectionProtocol enumprotocol1) {
+ // Paper start - add flush parameter
+ this.doSendPacket(packet, genericfuturelistener, enumprotocol, enumprotocol1, true);
+ this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, true);
+ }
+ private void doSendPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener, ConnectionProtocol enumprotocol, ConnectionProtocol enumprotocol1, boolean flush) {
+ private void doSendPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> callback, ConnectionProtocol enumprotocol, ConnectionProtocol enumprotocol1, boolean flush) {
+ // Paper end - add flush parameter
if (enumprotocol != enumprotocol1) {
this.setProtocol(enumprotocol);
@@ -107,8 +107,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- ChannelFuture channelfuture = this.channel.writeAndFlush(packet);
+ ChannelFuture channelfuture = flush ? this.channel.writeAndFlush(packet) : this.channel.write(packet); // Paper - add flush parameter
if (genericfuturelistener != null) {
channelfuture.addListener(genericfuturelistener);
if (callback != null) {
channelfuture.addListener(callback);
@@ -0,0 +0,0 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
}
private boolean processQueue() {