While working for Mr. Howell, Gilligan unearths a chest. The castaways think it must contain a pirate's treasure. When ownership of the chest is disputed, the case goes to court, with the Professor presiding as judge.