mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add setting for hiding system/xpbar messages
Add settings for disabling: - System Messages - XP Bar Messages Fix #95
This commit is contained in:
parent
8560753949
commit
8bd130eb3a
2 changed files with 17 additions and 1 deletions
|
|
@ -140,7 +140,17 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
SendPacket(0x00, packetData);
|
SendPacket(0x00, packetData);
|
||||||
break;
|
break;
|
||||||
case 0x02: //Chat message
|
case 0x02: //Chat message
|
||||||
handler.OnTextReceived(ChatParser.ParseText(readNextString(ref packetData)));
|
string message = readNextString(ref packetData);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Hide system messages or xp bar messages?
|
||||||
|
byte messageType = readData(1, ref packetData)[0];
|
||||||
|
if ((messageType == 1 && !Settings.DisplaySystemMessages)
|
||||||
|
|| (messageType == 2 && !Settings.DisplayXPBarMessages))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch (IndexOutOfRangeException) { /* No message type */ }
|
||||||
|
handler.OnTextReceived(ChatParser.ParseText(message));
|
||||||
break;
|
break;
|
||||||
case 0x38: //Player List update
|
case 0x38: //Player List update
|
||||||
if (protocolversion >= MC18Version)
|
if (protocolversion >= MC18Version)
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ namespace MinecraftClient
|
||||||
public static string chatbotLogFile = "";
|
public static string chatbotLogFile = "";
|
||||||
public static bool CacheScripts = true;
|
public static bool CacheScripts = true;
|
||||||
public static string BrandInfo = MCCBrandInfo;
|
public static string BrandInfo = MCCBrandInfo;
|
||||||
|
public static bool DisplaySystemMessages = true;
|
||||||
|
public static bool DisplayXPBarMessages = true;
|
||||||
|
|
||||||
//AntiAFK Settings
|
//AntiAFK Settings
|
||||||
public static bool AntiAFK_Enabled = false;
|
public static bool AntiAFK_Enabled = false;
|
||||||
|
|
@ -171,6 +173,8 @@ namespace MinecraftClient
|
||||||
case "mcversion": ServerVersion = argValue; break;
|
case "mcversion": ServerVersion = argValue; break;
|
||||||
case "splitmessagedelay": splitMessageDelay = TimeSpan.FromSeconds(str2int(argValue)); break;
|
case "splitmessagedelay": splitMessageDelay = TimeSpan.FromSeconds(str2int(argValue)); break;
|
||||||
case "scriptcache": CacheScripts = str2bool(argValue); break;
|
case "scriptcache": CacheScripts = str2bool(argValue); break;
|
||||||
|
case "showsystemmessages": DisplaySystemMessages = str2bool(argValue); break;
|
||||||
|
case "showxpbarmessages": DisplaySystemMessages = str2bool(argValue); break;
|
||||||
|
|
||||||
case "botowners":
|
case "botowners":
|
||||||
Bots_Owners.Clear();
|
Bots_Owners.Clear();
|
||||||
|
|
@ -395,6 +399,8 @@ namespace MinecraftClient
|
||||||
+ "mcversion=auto #use 'auto' or '1.X.X' values\r\n"
|
+ "mcversion=auto #use 'auto' or '1.X.X' values\r\n"
|
||||||
+ "brandinfo=mcc #use 'mcc','vanilla', or 'none'\r\n"
|
+ "brandinfo=mcc #use 'mcc','vanilla', or 'none'\r\n"
|
||||||
+ "chatbotlogfile= #leave empty for no logfile\r\n"
|
+ "chatbotlogfile= #leave empty for no logfile\r\n"
|
||||||
|
+ "showsystemmessages=true #system messages for server ops\r\n"
|
||||||
|
+ "showxpbarmessages=true #messages displayed above xp bar\r\n"
|
||||||
+ "accountlist=accounts.txt\r\n"
|
+ "accountlist=accounts.txt\r\n"
|
||||||
+ "serverlist=servers.txt\r\n"
|
+ "serverlist=servers.txt\r\n"
|
||||||
+ "playerheadicon=true\r\n"
|
+ "playerheadicon=true\r\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue