Added safeguard for the walk range.

This commit is contained in:
Milutinke 2022-09-28 18:46:17 +02:00
parent 9903ad7535
commit 5d1eabd74c
2 changed files with 9 additions and 0 deletions

View file

@ -42,6 +42,14 @@ namespace MinecraftClient.ChatBots
useTerrainHandling = false;
LogToConsole(Translations.TryGet("bot.antiafk.not_using_terrain_handling"));
}
else
{
if (walkRange <= 0)
{
walkRange = 5;
LogToConsole(Translations.TryGet("bot.antiafk.invalid_walk_range"));
}
}
}
if (string.IsNullOrEmpty(pingparam))

View file

@ -433,6 +433,7 @@ bot.antiafk.invalid_range_partial=Invalid time range provided, using the first p
bot.antiafk.invalid_range=Invalid time range provided, using default time of 600!
bot.antiafk.invalid_value=Invalid time provided, using default time of 600!
bot.antiafk.swapping=The time range begins with a bigger value, swapped them around.
bot.antiafk.invalid_walk_range=Invalid walk range provided, must be a positive integer greater than 0, using default value of 5!
# AutoAttack
bot.autoAttack.mode=Unknown attack mode: {0}. Using single mode as default.