https://github.com/ORelio/Minecraft-Console-Client/issues/729: allow to use GetServerPort/GetServerHost/GetUsername/GetUserUUID in MCC scripts

This commit is contained in:
TheSnoozer 2019-09-20 09:26:30 +02:00 committed by ORelio
parent 877e50579d
commit f209130464

View file

@ -668,6 +668,42 @@ namespace MinecraftClient
}
}
/// <summary>
/// Return the Server Port where the client is connected to
/// </summary>
/// <returns>Server Port where the client is connected to</returns>
protected int GetServerPort()
{
return Handler.GetServerPort();
}
/// <summary>
/// Return the Server Host where the client is connected to
/// </summary>
/// <returns>Server Host where the client is connected to</returns>
protected string GetServerHost()
{
return Handler.GetServerHost();
}
/// <summary>
/// Return the Username of the current account
/// </summary>
/// <returns>Username of the current account</returns>
protected string GetUsername()
{
return Handler.GetUsername();
}
/// <summary>
/// Return the UserUUID of the current account
/// </summary>
/// <returns>UserUUID of the current account</returns>
protected string GetUserUUID()
{
return Handler.GetUserUUID();
}
/// <summary>
/// Return the list of currently online players
/// </summary>