Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Unbreak Forge logic.
Dieser Commit ist enthalten in:
Ursprung
d59c8874b7
Commit
222e90a9f0
@ -94,14 +94,15 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
serverConn.getPlayer().sendLegacyForgeHandshakeResetPacket();
|
||||
}
|
||||
|
||||
// Always forward these messages during login
|
||||
// Always forward these messages during login. Don't pass it onto the handleGeneric below.
|
||||
return false;
|
||||
}
|
||||
|
||||
ChannelIdentifier id = server.getChannelRegistrar().getFromId(packet.getChannel());
|
||||
if (id == null) {
|
||||
serverConn.getPlayer().getConnection().write(packet);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
PluginMessageEvent event = new PluginMessageEvent(serverConn, serverConn.getPlayer(), id, packet.getData());
|
||||
server.getEventManager().fire(event)
|
||||
.thenAcceptAsync(pme -> {
|
||||
@ -109,7 +110,6 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
serverConn.getPlayer().getConnection().write(packet);
|
||||
}
|
||||
}, serverConn.getConnection().eventLoop());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -134,11 +134,9 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (serverConn.hasCompletedJoin()) {
|
||||
// Just forward the packet on. We don't have anything to handle at this time.
|
||||
serverConn.getPlayer().getConnection().write(packet);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleUnknown(ByteBuf buf) {
|
||||
@ -149,10 +147,8 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (serverConn.hasCompletedJoin()) {
|
||||
serverConn.getPlayer().getConnection().write(buf.retain());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exception(Throwable throwable) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren