mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Added documentation examples and covered an edge case
This commit is contained in:
parent
fe5f07306d
commit
c5a0409edc
4 changed files with 39 additions and 2 deletions
|
|
@ -218,6 +218,12 @@ namespace MinecraftClient.ChatBots
|
|||
{
|
||||
var min = Convert.ToInt32(parts[0]);
|
||||
var max = Convert.ToInt32(parts[1]);
|
||||
|
||||
if (min > max)
|
||||
{
|
||||
(min, max) = (max, min);
|
||||
LogToConsole(Translations.cmd_wait_random_min_bigger);
|
||||
}
|
||||
|
||||
ticks = new Random().Next(min, max);
|
||||
} else ticks = Convert.ToInt32(instruction_line[5..]);
|
||||
|
|
|
|||
|
|
@ -3968,5 +3968,11 @@ namespace MinecraftClient {
|
|||
return ResourceManager.GetString("bot.common.movement.lock.held", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string cmd_wait_random_min_bigger {
|
||||
get {
|
||||
return ResourceManager.GetString("cmd.wait.random.min.bigger", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2115,4 +2115,7 @@ Logging in...</value>
|
|||
<data name="bot.common.movement.lock.held" xml:space="preserve">
|
||||
<value>You can not start/run/use the '{0}' bot because it requires movement, the movement is currently utilized by the '{1}' bot, stop it if you want to use this one.</value>
|
||||
</data>
|
||||
<data name="cmd.wait.random.min.bigger" xml:space="preserve">
|
||||
<value>Minimum number that you have provided is bigger than the maximum, swapping them around!</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Add table
Add a link
Reference in a new issue