mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add support for C# scripts in scripting bot
- Now scripts can also be written in C# - C# scripts can access ChatBot API - Add more methods in ChatBot API - Add an example of C# script file - Coding style fixes: method names ucfirst
This commit is contained in:
parent
3224c59eab
commit
3ce91188c7
22 changed files with 321 additions and 135 deletions
|
|
@ -69,15 +69,15 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
public override void GetText(string text)
|
||||
{
|
||||
text = getVerbatim(text);
|
||||
text = GetVerbatim(text);
|
||||
string sender = "";
|
||||
string message = "";
|
||||
|
||||
if (saveChat && isChatMessage(text, ref message, ref sender))
|
||||
if (saveChat && IsChatMessage(text, ref message, ref sender))
|
||||
{
|
||||
save("Chat " + sender + ": " + message);
|
||||
}
|
||||
else if (savePrivate && isPrivateMessage(text, ref message, ref sender))
|
||||
else if (savePrivate && IsPrivateMessage(text, ref message, ref sender))
|
||||
{
|
||||
save("Private " + sender + ": " + message);
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ namespace MinecraftClient.ChatBots
|
|||
private void save(string tosave)
|
||||
{
|
||||
if (dateandtime)
|
||||
tosave = getTimestamp() + ' ' + tosave;
|
||||
tosave = GetTimestamp() + ' ' + tosave;
|
||||
|
||||
string directory = Path.GetDirectoryName(logfile);
|
||||
if (!String.IsNullOrEmpty(directory) && !Directory.Exists(directory))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue