mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
few less allocations
This commit is contained in:
parent
bb8c39dc12
commit
66ce425c77
@ -31,7 +31,7 @@ namespace MCGalaxy {
|
|||||||
//if (Regex.IsMatch(message, "&a")) break;
|
//if (Regex.IsMatch(message, "&a")) break;
|
||||||
|
|
||||||
if ( lines.Count > 0 ) {
|
if ( lines.Count > 0 ) {
|
||||||
if ( message[0].ToString() == "&" )
|
if ( message[0] == '&' )
|
||||||
message = "> " + message.Trim();
|
message = "> " + message.Trim();
|
||||||
else
|
else
|
||||||
message = "> " + color + message.Trim();
|
message = "> " + color + message.Trim();
|
||||||
|
@ -53,13 +53,13 @@ namespace MCGalaxy.Commands.Bots {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string ai = args[1].ToLower();
|
string ai = args[1].ToLower();
|
||||||
if (ai == "hunt") {
|
if (ai.CaselessEq("hunt")) {
|
||||||
bot.hunt = !bot.hunt;
|
bot.hunt = !bot.hunt;
|
||||||
bot.Instructions.Clear();
|
bot.Instructions.Clear();
|
||||||
bot.AIName = "";
|
bot.AIName = "";
|
||||||
UpdateBot(p, bot, "'s hunt instinct: " + bot.hunt);
|
UpdateBot(p, bot, "'s hunt instinct: " + bot.hunt);
|
||||||
return;
|
return;
|
||||||
} else if (ai == "kill") {
|
} else if (ai.CaselessEq("kill")) {
|
||||||
if (!CheckExtraPerm(p)) { MessageNeedExtra(p, 1); return; }
|
if (!CheckExtraPerm(p)) { MessageNeedExtra(p, 1); return; }
|
||||||
bot.kill = !bot.kill;
|
bot.kill = !bot.kill;
|
||||||
UpdateBot(p, bot, "'s kill instinct: " + bot.kill);
|
UpdateBot(p, bot, "'s kill instinct: " + bot.kill);
|
||||||
|
@ -85,8 +85,8 @@ namespace MCGalaxy {
|
|||||||
List<string> maps = AutoloadMaps.AllNames();
|
List<string> maps = AutoloadMaps.AllNames();
|
||||||
|
|
||||||
foreach (string map in maps) {
|
foreach (string map in maps) {
|
||||||
string name = map.ToLower();
|
if (map.CaselessEq(mainLevel.name)) continue;
|
||||||
if (name != mainLevel.name) CmdLoad.LoadLevel(null, name);
|
CmdLoad.LoadLevel(null, map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user