handling incorrect option, fixes #361
This commit is contained in:
1 parent
3f5e2cd2c5
commit
c5dcc7e6e5
1 file changed
+9
-1
@@ -20,7 +20,15 @@ public class PathfindingVisualizer
|
||||
{
|
||||
if (!(player instanceof ServerPlayerEntity))
|
||||
return null;
|
||||
int minDuration = Integer.parseInt(option);
|
||||
int minDuration;
|
||||
try
|
||||
{
|
||||
minDuration = Integer.parseInt(option);
|
||||
}
|
||||
catch (NumberFormatException ignored)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (miliseconds < minDuration)
|
||||
return null;
|
||||
if (player.squaredDistanceTo(entity) > 1000 && player.squaredDistanceTo(target) > 1000)
|
||||
|
||||
Reference in new issue
Block a user