Just add checks. Maybe create a Boolean for it
private boolean chestOpened;
When the player opens the chest turn the Boolean true. The chest should have a Boolean check checking if the booleans true or false, If booleans false, it'd get the random items and it'd turn the Boolean true, if the booleans true to do nothing or if you want, you can add a message saying you've already searched this chest or something.
Example:
case chestObjectId:
if (!chestOpened) {
doshit();
chestOpened = true;
} else if (chestOpened) {
sendMessage("You've already searched this chest");
}
Then when the Minigame ends, just reset the Boolean to false.