コード例 #1
0
 public override string ToString()
 {
     return("BasicStatus\n" +
            $"| {nameof(ServerUUID)}: {ServerUUID}\n" +
            $"| {nameof(SessionId)}: {SessionId.GetString()}\n" +
            $"| {nameof(Motd)}: {Motd}\n" +
            $"| {nameof(GameType)}: {GameType}\n" +
            $"| {nameof(Map)}: {Map}\n" +
            $"| {nameof(NumPlayers)}: {NumPlayers}\n" +
            $"| {nameof(MaxPlayers)}: {MaxPlayers}\n" +
            $"| {nameof(HostPort)}: {HostPort}\n" +
            $"| {nameof(HostIp)}: {HostIp}");
 }
コード例 #2
0
 public override string ToString()
 {
     return("FullStatus\n" +
            $"| {nameof(ServerUUID)}: {ServerUUID}\n" +
            $"| {nameof(SessionId)}: {SessionId.GetString()}\n" +
            $"| {nameof(Motd)}: {Motd}\n" +
            $"| {nameof(GameType)}: {GameType}\n" +
            $"| {nameof(GameId)}: {GameId}\n" +
            $"| {nameof(Version)}: {Version}\n" +
            $"| {nameof(Plugins)}: {Plugins}\n" +
            $"| {nameof(Map)}: {Map}\n" +
            $"| {nameof(NumPlayers)}: {NumPlayers}\n" +
            $"| {nameof(MaxPlayers)}: {MaxPlayers}\n" +
            $"| {nameof(PlayerList)}: [{string.Join(", ", PlayerList)}]\n" +
            $"| {nameof(HostPort)}: {HostPort}\n" +
            $"| {nameof(HostIp)}: {HostIp}");
 }