Jails or shadowbans were used in RetroMC, back in 2019 to keep players who broke the rules in an enclosed area, so that they could think about what they had done.
Imprisoned players couldn't run any commands, so private messaging and teleporting were disabled.
They could still receive messages from other players.
Prisoners could make money by selling wood and apples, and by killing hostile mobs.
Around a certain timeframe, this mechanic was no longer used by staff due to imprisoned players joining and leaving ad nauseam.