Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fix 1.4-1.6 SLP, use text from maven central.
Dieser Commit ist enthalten in:
Ursprung
354d60b036
Commit
1ab926b572
@ -9,13 +9,12 @@ sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'io.netty:netty-all:4.1.27.Final'
|
||||
compile 'com.google.guava:guava:25.1-jre'
|
||||
compile 'com.google.code.gson:gson:2.8.5'
|
||||
compile 'com.github.KyoriPowered:text:v1.12-1.5.0'
|
||||
compile 'net.kyori:text:1.12-1.5.0'
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
}
|
||||
|
@ -16,9 +16,8 @@ public class LegacyPingEncoder extends MessageToByteEncoder<LegacyPingResponse>
|
||||
protected void encode(ChannelHandlerContext ctx, LegacyPingResponse msg, ByteBuf out) throws Exception {
|
||||
out.writeByte(0xff);
|
||||
String serializedResponse = serialize(msg);
|
||||
byte[] serializedBytes = serializedResponse.getBytes(StandardCharsets.UTF_16BE);
|
||||
out.writeShort(serializedBytes.length);
|
||||
out.writeBytes(serializedBytes);
|
||||
out.writeShort(serializedResponse.length());
|
||||
out.writeBytes(serializedResponse.getBytes(StandardCharsets.UTF_16BE));
|
||||
System.out.println(ByteBufUtil.prettyHexDump(out));
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren