NiekertDev / Discord-MCPE

Connect your PMMP server with Discord!
Other
28 stars 17 forks source link

Replace getNameTag() with getDisplayName() #31

Closed Aericio closed 6 years ago

Aericio commented 6 years ago

image image If you use getNameTag(), it'll show the color codes on quit. If you use getDisplayName(), it will just get their nickname instead. In case the nickname uses color codes, it cleans the formatting with TextFormat::clean().

Optionally, you could just use getName() if you wanted and not need to use TextFormat::clean().

Aericio commented 6 years ago

Wait, do you want PurePerms ranks to be shown?

NiekertDev commented 6 years ago

Actually, atm I'm having a veeery long break, but I don't think people want to show pureperms name, but can you tell me why it returns the pureperms name only when you left?

P.S. Most of the plugin needs to be rewritten so a event isn't being called when not enabled, part of the reason is that it is my first plugin ever made and I learned a lot while making it

NiekertDev commented 6 years ago

Thank you for helping me! You partly fixed #29

Aericio commented 6 years ago

Most likely due to PureChat updating the tags after the player had joined the server. You're probably getting the nametag the moment they connect... that's my guess.