Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Merge remote-tracking branch 'origin/dev/3.0.0' into dev/3.0.0
Dieser Commit ist enthalten in:
Commit
f744b37ad5
@ -143,7 +143,7 @@ public class ServerLogin implements MinecraftPacket {
|
|||||||
public int expectedMaxLength(ByteBuf buf, Direction direction, ProtocolVersion version) {
|
public int expectedMaxLength(ByteBuf buf, Direction direction, ProtocolVersion version) {
|
||||||
// Accommodate the rare (but likely malicious) use of UTF-8 usernames, since it is technically
|
// Accommodate the rare (but likely malicious) use of UTF-8 usernames, since it is technically
|
||||||
// legal on the protocol level.
|
// legal on the protocol level.
|
||||||
int base = 1 + (16 * 4);
|
int base = 1 + (16 * 3);
|
||||||
// Adjustments for Key-authentication
|
// Adjustments for Key-authentication
|
||||||
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) >= 0) {
|
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) >= 0) {
|
||||||
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_3) < 0) {
|
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_3) < 0) {
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren