mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Allow specifying max number of bots allowed on a map
This commit is contained in:
parent
2766924ed7
commit
8bd33f42f3
@ -56,6 +56,9 @@ namespace MCGalaxy.Commands.Bots {
|
|||||||
if (BotExists(p.level, botName)) {
|
if (BotExists(p.level, botName)) {
|
||||||
Player.Message(p, "A bot with that name already exists."); return;
|
Player.Message(p, "A bot with that name already exists."); return;
|
||||||
}
|
}
|
||||||
|
if (p.level.Bots.Count >= ServerConfig.MaxBotsPerLevel) {
|
||||||
|
Player.Message(p, "Reached maximum number of bots allowed on this map."); return;
|
||||||
|
}
|
||||||
|
|
||||||
PlayerBot bot = new PlayerBot(botName, p.level);
|
PlayerBot bot = new PlayerBot(botName, p.level);
|
||||||
bot.Pos = p.Pos;
|
bot.Pos = p.Pos;
|
||||||
|
@ -102,6 +102,8 @@ namespace MCGalaxy {
|
|||||||
[ConfigString("default-rank", "General", "guest")]
|
[ConfigString("default-rank", "General", "guest")]
|
||||||
public static string DefaultRankName = "guest";
|
public static string DefaultRankName = "guest";
|
||||||
|
|
||||||
|
[ConfigInt("max-bots-per-level", "Other", 192, 0, 256)]
|
||||||
|
public static int MaxBotsPerLevel = 192;
|
||||||
[ConfigBool("deathcount", "Other", true)]
|
[ConfigBool("deathcount", "Other", true)]
|
||||||
public static bool AnnounceDeathCount = true;
|
public static bool AnnounceDeathCount = true;
|
||||||
[ConfigBool("use-whitelist", "Other", false)]
|
[ConfigBool("use-whitelist", "Other", false)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user