EssentialsX

EssentialsX

2M Downloads

When console is executing a command when a player receives a kit, the {PLAYERNAME} seems to be invalid

dixiatielu opened this issue ยท 5 comments

commented

Information

Full output of /ess version:
[10:20:53 INFO]: Server Version: 1.15.2-R0.1-SNAPSHOT git-Paper-385 (MC: 1.15.2)
[10:20:53 INFO]: EssentialsX Version: 2.18.0.8
[10:20:53 INFO]: LuckPerms Version: 5.1.84
[10:20:53 INFO]: Vault Version: 1.7.3-b131
[10:20:53 INFO]: EssentialsXProtect Version: 2.18.0.8
[10:20:53 INFO]: EssentialsXChat Version: 2.18.0.8
[10:20:53 INFO]: EssentialsXAntiBuild Version: 2.18.0.8
[10:20:53 INFO]: EssentialsXSpawn Version: 2.18.0.8
[10:20:53 INFO]: PlaceholderAPI Version: 2.10.9

Server log:
https://gist.github.com/dixiatielu/cb6b375077f771bd5deb578e37b36ef2

EssentialsX config
Config Here

Help request

Problem

I tried to add a sever command in kits.yml, which includes {PLAYER}. Like this:

  ten_online_gift: 
    delay: -1
    items:
      - /lp user {PLAYER} parent add sponsori

When I tried to give the kit to the player, the console said it's not a valid username.
image

What I have tried

I tried to change the /lp command to /give {PLAYERNAME} acacialog , but it worked successfully.
But when I tried /setvip {PLAYER} SponsorI 1, it doesn't work again.
image

Screenshots

See above.

commented

Can confirm.
image
What seems to be the issue is that EssentialsX provides usernames with color codes in them

commented

Try using the {USERNAME} placeholder instead. The {PLAYER} placeholder returns the player's display name, including any prefixes/suffixes/coloring.

commented

Try using the {USERNAME} placeholder instead. The {PLAYER} placeholder returns the player's display name, including any prefixes/suffixes/coloring.

Yeah that works. Could you update the comments in kits.yml?

commented

Yeah that works. Could you update the comments in kits.yml?

kits.yml already reflects this:

# To make the kit execute a command, add /<command> to the items list. Use {USERNAME} to specify the player receiving the kit.
# {PLAYER} will show the player's displayname instead of username.

commented

Yeah that works. Could you update the comments in kits.yml?

kits.yml already reflects this:

# To make the kit execute a command, add /<command> to the items list. Use {USERNAME} to specify the player receiving the kit.
# {PLAYER} will show the player's displayname instead of username.

OK, thanks. Maybe that's just because my config is a little bit old.