public virtual string GetMotd(ServerInfo serverInfo, IPEndPoint caller) { NumberOfPlayers = serverInfo.NumberOfPlayers; MaxNumberOfPlayers = serverInfo.MaxNumberOfPlayers; return(string.Format($"MCPE;{Motd};91;0.17;{NumberOfPlayers};{MaxNumberOfPlayers};{Motd.GetHashCode() + caller.Address.Address + caller.Port};{SecondLine};Survival;")); }
public override string GetMotd(ConnectionInfo serverInfo, IPEndPoint caller, bool eduMotd = false) { var protocolVersion = McpeProtocolInfo.ProtocolVersion; var clientVersion = McpeProtocolInfo.GameVersion; var edition = "MCPE"; return(string.Format($"{edition};{Motd};{protocolVersion};{clientVersion};{NumberOfPlayers};{MaxNumberOfPlayers};{Motd.GetHashCode() + caller.Address.Address + caller.Port};{SecondLine};Survival;")); }
public virtual string GetMotd(ServerInfo serverInfo, IPEndPoint caller, bool eduMotd = false) { NumberOfPlayers = serverInfo.NumberOfPlayers; MaxNumberOfPlayers = serverInfo.MaxNumberOfPlayers; var protocolVersion = McpeProtocolInfo.ProtocolVersion.ToString(); var clientVersion = McpeProtocolInfo.GameVersion; var edition = "MCPE"; if (eduMotd) { protocolVersion = "111"; clientVersion = "1.0.17"; edition = "MCEE"; } return(string.Format($"{edition};{Motd};{protocolVersion};{clientVersion};{NumberOfPlayers};{MaxNumberOfPlayers};{Motd.GetHashCode() + caller.Address.Address + caller.Port};{SecondLine};Survival;")); }
public override string GetMotd(ServerInfo serverInfo, IPEndPoint caller, bool eduMotd = false) { NumberOfPlayers = serverInfo.NumberOfPlayers; MaxNumberOfPlayers = serverInfo.MaxNumberOfPlayers; var protocolVersion = "140"; var clientVersion = "1.2.5"; var edition = "MCPE"; if (eduMotd) { protocolVersion = "111"; clientVersion = "1.0.17"; edition = "MCEE"; } #pragma warning disable CS0618 // Type or member is obsolete return(string.Format($"{edition};{Motd};{protocolVersion};{clientVersion};{ExternalGameHandler.TotalPlayers};{MaxNumberOfPlayers};{Motd.GetHashCode() + caller.Address.Address + caller.Port};{SecondLine};Survival;")); #pragma warning restore CS0618 // Type or member is obsolete }