mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
* Basic support of language file Only mapped main part of MCC. * Translations function imporve * Change translation file naming * Fix default translation file naming * Complete translation file mapping for main part Command and ChatBot not done yet * Complete translation mapping for commands Except Entitycmd * Complete translation mapping for ChatBots * Add new method for replacing translation key Just for Entitycmd. Be proud of yourself. We have a convenient method now. * Complete all translation mapping * Add default config and translation file to resource * Remove untranslatable messages from default translation file
30 lines
778 B
C#
30 lines
778 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace MinecraftClient.ChatBots
|
|
{
|
|
/// <summary>
|
|
/// Example of message receiving.
|
|
/// </summary>
|
|
|
|
public class TestBot : ChatBot
|
|
{
|
|
public override void GetText(string text)
|
|
{
|
|
string message = "";
|
|
string username = "";
|
|
text = GetVerbatim(text);
|
|
|
|
if (IsPrivateMessage(text, ref message, ref username))
|
|
{
|
|
LogToConsoleTranslated("bot.testBot.told", username, message);
|
|
}
|
|
else if (IsChatMessage(text, ref message, ref username))
|
|
{
|
|
LogToConsoleTranslated("bot.testBot.said", username, message);
|
|
}
|
|
}
|
|
}
|
|
}
|