Files
CoreApp/proto/server.proto
2025-07-11 02:38:05 +08:00

47 lines
770 B
Protocol Buffer

syntax = "proto3";
option go_package = "router/minecraft";
option java_multiple_files = true;
option java_package = "cn.nextcraft.core.proto";
enum ServerPacketType {
PING = 0;
PONG = 1;
NEW = 2;
DELETE = 3;
CONNECT = 4;
JOIN = 5;
LEAVE = 6;
LIST = 7;
}
message ServerPacket {
ServerPacketType typ = 1;
optional bytes payload = 2;
}
message ServerNewPacket {
string serverId = 1;
string name = 2;
string host = 3;
int32 port = 4;
string motd = 5;
string group = 6;
}
message ServerDeletePacket {
string serverId = 1;
}
message ServerConnectPacket {
string serverId = 1;
string player = 2;
}
message ServerPlayerPacket {
string player = 1;
}
message ServerListPacket {
string serverId = 1;
repeated string players = 2;
}