3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-23 23:00:35 +01:00

Add missing allowed check. Fixes #335

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-28 16:50:34 -04:00
Ursprung 7ab56d0ca0
Commit 5a515f37a3

Datei anzeigen

@ -219,9 +219,11 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
PluginMessageEvent event = new PluginMessageEvent(player, serverConn, id,
ByteBufUtil.getBytes(packet.content()));
server.getEventManager().fire(event).thenAcceptAsync(pme -> {
PluginMessage message = new PluginMessage(packet.getChannel(),
Unpooled.wrappedBuffer(copy));
backendConn.write(message);
if (pme.getResult().isAllowed()) {
PluginMessage message = new PluginMessage(packet.getChannel(),
Unpooled.wrappedBuffer(copy));
backendConn.write(message);
}
}, backendConn.eventLoop());
}
}