3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-06 00:00:47 +01:00

Fix sendPluginMessage (#926)

Dieser Commit ist enthalten in:
EpicPlayerA10 2023-01-13 23:43:50 +01:00 committet von GitHub
Ursprung d9ee34feac
Commit 8a048f0505
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -155,9 +155,10 @@ public class VelocityRegisteredServer implements RegisteredServer, ForwardingAud
*/ */
public boolean sendPluginMessage(ChannelIdentifier identifier, ByteBuf data) { public boolean sendPluginMessage(ChannelIdentifier identifier, ByteBuf data) {
for (ConnectedPlayer player : players.values()) { for (ConnectedPlayer player : players.values()) {
VelocityServerConnection connection = player.getConnectedServer(); VelocityServerConnection serverConnection = player.getConnectedServer();
if (connection != null && connection.getServer() == this) { if (serverConnection != null && serverConnection.getConnection() != null
return connection.sendPluginMessage(identifier, data); && serverConnection.getServer() == this) {
return serverConnection.sendPluginMessage(identifier, data);
} }
} }