PowerRanks

PowerRanks

650k Downloads

Don't allow placeholders in chat messages

greatericontop opened this issue ยท 0 comments

commented

I'm not a dummy, so I've checked these

  • I am not using any other permission management plugin
  • I use the latest available version of PowerRanks
  • I am a human

Is your feature request related to a problem? Please describe.
Allowing players to use placeholders in chat message can be annoying. Some placeholders are best kept secret, such as %vanished_players%. It would be best to either disable it entirely or lock it to a permission, e.g. powerranks.chatplaceholders.

Describe the solution you'd like
(I haven't looked at the code so I'm assuming a few things but the general structure should be the same)
Don't apply PlaceholderAPI.setPlaceholders to message.
Example: PlaceholderAPI.setPlaceholderss(prefix + namecolor + name) + message

Describe alternatives you've considered
Use regex to remove any % in the message, but that also means you're not able to use any % in the message.
Use regex again to somehow escape the % so that the placeholder doesn't recognize it. (How do you do this? What counts as escaped?)

Additional context
You can do something like type %powerranks_prefix% in chat to see if it happens or not.