Fixes crash when player in CREATIVE shift+clicks on INVENTORY challenge.

Limit completion time to 2, if player is in creative instead of Integer.MAX_VALUE

Fixes #330
This commit is contained in:
BONNe 2024-01-11 09:40:20 +02:00
parent 74cd97fb80
commit 8a8124f36e

View File

@ -952,6 +952,8 @@ public class TryToComplete
else else
{ {
requiredItems = Collections.emptyList(); requiredItems = Collections.emptyList();
// Set maxTime to 2, to not crash client when completing 2147483647 times.
maxTimes = 2;
} }
// Return the result // Return the result