0
This repository has been archived on 2022-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mc-protocol/src/main/java/mc/protocol/status/server/StatusServerResponse.java

37 lines
1.0 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package mc.protocol.status.server;
import lombok.Data;
import mc.protocol.Packet;
import mc.protocol.io.NetInputStream;
import mc.protocol.io.NetOutputStream;
/**
* Status server packet, response.
*
* <p>Информация о сервере</p>
*
* <p>Структура пакета
* <pre>
* | FIELD | TYPE | NOTES |
* |---------------|--------|-----------------------------------------|
* | JSON Response | String | Информация о сервере в JSON формате [1] |
*
* [1] - <a href="https://wiki.vg/index.php?title=Server_List_Ping&oldid=7555#Response" target="_top">Server List Ping: Response</a>
* </pre></p>
*/
@Data
public class StatusServerResponse implements Packet {
private String info;
@Override
public void readSelf(NetInputStream netInputStream) {
info = netInputStream.readString();
}
@Override
public void writeSelf(NetOutputStream netOutputStream) {
netOutputStream.writeString(info);
}
}