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))