From f209130464733075383356a1cb871e1e29274cca Mon Sep 17 00:00:00 2001 From: TheSnoozer Date: Fri, 20 Sep 2019 09:26:30 +0200 Subject: [PATCH] https://github.com/ORelio/Minecraft-Console-Client/issues/729: allow to use GetServerPort/GetServerHost/GetUsername/GetUserUUID in MCC scripts --- MinecraftClient/ChatBot.cs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index 051eea01..ab595369 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -668,6 +668,42 @@ namespace MinecraftClient } } + /// + /// Return the Server Port where the client is connected to + /// + /// Server Port where the client is connected to + protected int GetServerPort() + { + return Handler.GetServerPort(); + } + + /// + /// Return the Server Host where the client is connected to + /// + /// Server Host where the client is connected to + protected string GetServerHost() + { + return Handler.GetServerHost(); + } + + /// + /// Return the Username of the current account + /// + /// Username of the current account + protected string GetUsername() + { + return Handler.GetUsername(); + } + + /// + /// Return the UserUUID of the current account + /// + /// UserUUID of the current account + protected string GetUserUUID() + { + return Handler.GetUserUUID(); + } + /// /// Return the list of currently online players ///