fix packet listener invocation when packet is sent async (#1587)

This commit is contained in:
Pasqual Koschmieder 2022-05-04 06:22:00 +02:00 committed by GitHub
parent c87604cf0c
commit 7bfee67a29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ public class PacketFilterManager implements ListenerInvoker, InternalManager {
NetworkMarker copy = marker; // okay fine
this.server.getScheduler().scheduleSyncDelayedTask(
this.plugin,
() -> this.sendServerPacket(receiver, packet, copy, true));
() -> this.sendServerPacket(receiver, packet, copy, false));
return;
}

View File

@ -499,7 +499,7 @@ public class NettyChannelInjector implements Injector {
// not on the main thread but we are required to be - re-schedule the packet on the main thread
this.server.getScheduler().scheduleSyncDelayedTask(
this.injectionFactory.getPlugin(),
() -> this.sendServerPacket(packet, null, false));
() -> this.sendServerPacket(packet, null, true));
return null;
}