I have a suggestion, use:
%player's uuid%
instead of:
%player%
This is because, if the user changes their name, their punishment will save.
If the user changes their name without using the uuid, the punishment is only banning the player's username not the user's id.