3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Add missing allowed check to 1.0.x. Fixes #335

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-28 16:53:15 -04:00
Ursprung e038a71baf
Commit e011f1d783

Datei anzeigen

@ -230,8 +230,11 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
} else { } else {
PluginMessageEvent event = new PluginMessageEvent(player, serverConn, id, PluginMessageEvent event = new PluginMessageEvent(player, serverConn, id,
packet.getData()); packet.getData());
server.getEventManager().fire(event).thenAcceptAsync(pme -> backendConn.write(packet), server.getEventManager().fire(event).thenAcceptAsync(pme -> {
backendConn.eventLoop()); if (pme.getResult().isAllowed()) {
backendConn.write(packet);
}
}, backendConn.eventLoop());
} }
} }
} }