You're probably going to end up doing something like this:
%player.getDataBlock().getName() $= "MyCustomPlayer"
This is an inefficient way of doing it as it uses a string comparison, and, in the rare case of the player not having a datablock, will throw an error. Do this instead:
%player.getDataBlock() == nameToID("MyCustomPlayer")