So, from what I understand, you're trying to update the name tag when a player joins the world that the Slapper represents?
Well that's what the function you're editing does... Its name is getDisplayName(), AKA the entity's name(tag)
I'd reccomend you to start on easier project if you don't understand those basics... Also if you want to make slapper plugin better, contact plugin author about possible improvements, or create new one.
[15:48:26] [Server thread/CRITICAL]: Error: "Class 'slapper\Server' not found" (EXCEPTION) in "plugins/SlapperJoinMod.phar/src/slapper/SlapperTrait" at line 86 this is my problem when i join and got internal server error i have CreativePlot world i just wanna make count player on CreativePlot