Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add some extra keywords #4098

Merged
merged 3 commits into from
Mar 29, 2021
Merged

Conversation

triagonal
Copy link
Member

@triagonal triagonal commented Mar 29, 2021

Information

This PR "answers" #3994 and #4096.

Details

Proposed feature:

Just a few extra keywords that should be useful for those wanting more options in text files that use KeywordReplacer. Also adds the long overdue {NICKNAME} chat format placeholder.

The new User#getFormattedNickname() method might be a bit confusing amongst all of the other nick-related methods without some comments though. I decided to add it because there's currently no straightforward way to get just the user's formatted nickname without other bits like prefix/suffix and OP color etc. tacked on.

New tags (KeywordReplacer):
{NICKNAME} - The player's nickname. If the player has no nickname, the username is shown.
{PREFIX} - The player's prefix.
{SUFFIX} - The player's suffix.
{GROUP} - The player's primary group
{PLAYTIME} - The player's playtime.

New chat placeholder:
{NICKNAME} - The player's nickname. If the player has no nickname, the username is shown.

Environments tested:

OS: Windows 10 20H2
Java version: OpenJDK 1.8.0_282

  • Most recent Paper version (1.16.5, git-Paper-571)

@triagonal triagonal added the type: enhancement Features and feature requests. label Mar 29, 2021
@JRoy
Copy link
Member

JRoy commented Mar 29, 2021

Can you document the new placeholders in the various places they are present in the config?

@JRoy JRoy merged commit d757877 into EssentialsX:2.x Mar 29, 2021
@triagonal triagonal deleted the feature/more-keywords branch March 29, 2021 22:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants