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

Created on 17 Aug 2020  路  5Comments  路  Source: EssentialsX/Essentials

Information

Full output of /ess version:

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.

question

Most helpful comment

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

kits.yml already reflects this:

https://github.com/EssentialsX/Essentials/blob/73d2457feac4861de214143e5160e2b6795f5e57/Essentials/src/kits.yml#L8-L9

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

All 5 comments

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

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

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?

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

kits.yml already reflects this: https://github.com/EssentialsX/Essentials/blob/73d2457feac4861de214143e5160e2b6795f5e57/Essentials/src/kits.yml#L8-L9

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

kits.yml already reflects this:

https://github.com/EssentialsX/Essentials/blob/73d2457feac4861de214143e5160e2b6795f5e57/Essentials/src/kits.yml#L8-L9

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fieu picture fieu  路  3Comments

elijahblooom picture elijahblooom  路  3Comments

TheMattVid picture TheMattVid  路  3Comments

Castiella picture Castiella  路  3Comments

smmmadden picture smmmadden  路  3Comments