mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
+ Made MCC commands ignore case.
+ Started executing script when called with "/exec <scriptname>"
This commit is contained in:
parent
07ac3268cc
commit
6340feaa52
1 changed files with 8 additions and 3 deletions
|
|
@ -171,7 +171,7 @@ namespace MinecraftClient
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (text == "/quit" || text == "/reco" || text == "/reconnect") { break; }
|
if (text.ToLower() == "/quit" || text.ToLower().StartsWith("/exec ") || text.ToLower() == "/reco" || text.ToLower() == "/reconnect") { break; }
|
||||||
while (text.Length > 0 && text[0] == ' ') { text = text.Substring(1); }
|
while (text.Length > 0 && text[0] == ' ') { text = text.Substring(1); }
|
||||||
if (text != "")
|
if (text != "")
|
||||||
{
|
{
|
||||||
|
|
@ -200,13 +200,18 @@ namespace MinecraftClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (text == "/quit")
|
if (text.ToLower() == "/quit")
|
||||||
{
|
{
|
||||||
ConsoleIO.WriteLine("You have left the server.");
|
ConsoleIO.WriteLine("You have left the server.");
|
||||||
Disconnect();
|
Disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (text == "/reco" || text == "/reconnect")
|
else if (text.ToLower().StartsWith("/exec ")) {
|
||||||
|
handler.BotLoad(new Bots.Scripting("config/" + text.Split()[1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if (text.ToLower() == "/reco" || text.ToLower() == "/reconnect")
|
||||||
{
|
{
|
||||||
ConsoleIO.WriteLine("You have left the server.");
|
ConsoleIO.WriteLine("You have left the server.");
|
||||||
handler.SendRespawnPacket();
|
handler.SendRespawnPacket();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue