Skip to content

Commit

Permalink
Fixes crash when player in CREATIVE shift+clicks on INVENTORY challenge.
Browse files Browse the repository at this point in the history
Limit completion time to 2, if player is in creative instead of Integer.MAX_VALUE

Fixes #330
  • Loading branch information
BONNe committed Jan 11, 2024
1 parent 74cd97f commit 8a8124f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,8 @@ private ChallengeResult checkInventory(int maxTimes)
else
{
requiredItems = Collections.emptyList();
// Set maxTime to 2, to not crash client when completing 2147483647 times.
maxTimes = 2;
}

// Return the result
Expand Down

0 comments on commit 8a8124f

Please sign in to comment.