Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fix the 1.7+ SLP stuff.
Props to @Minecrell
Dieser Commit ist enthalten in:
Ursprung
8371073f91
Commit
354d60b036
@ -43,26 +43,26 @@ public class ServerPing {
|
||||
|
||||
public static class Version {
|
||||
private final int protocol;
|
||||
private final String version;
|
||||
private final String name;
|
||||
|
||||
public Version(int protocol, String version) {
|
||||
public Version(int protocol, String name) {
|
||||
this.protocol = protocol;
|
||||
this.version = version;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Version{" +
|
||||
"protocol=" + protocol +
|
||||
", version='" + version + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf> {
|
||||
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
|
||||
if (msg.isReadable()) {
|
||||
if (!msg.isReadable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class LegacyPingResponse {
|
||||
|
||||
public static LegacyPingResponse from(ServerPing ping) {
|
||||
return new LegacyPingResponse(ping.getVersion().getProtocol(),
|
||||
ping.getVersion().getVersion(),
|
||||
ping.getVersion().getName(),
|
||||
ComponentSerializers.LEGACY.serialize(ping.getDescription()),
|
||||
ping.getPlayers().getOnline(),
|
||||
ping.getPlayers().getMax());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren