{USERNAME} and {DATE} placeholders not working correctly in kits
ZepsiZola opened this issue ยท 0 comments
Type of bug
Other unexpected behaviour
/ess dump kits
output
https://essentialsx.net/dump.html?id=5cf017609c024f5e828a9017d1bcf0ec
Error log (if applicable)
No Error Log
Bug description
When parsing {USERNAME} into the item lore of an item in kits.yml
, all the underscores in the username are turned into spaces. This means you can never parse the player's name into an item without messing up any player who's name has an underscore in it. The opposite is true for the {DATE} placeholder. It gets parsed perfectly in the item lore of a kits.yml
item, but it gets broken when you try to use it in a command. This means that it is impossible to use both the {USERNAME} and the {DATE} placeholder in the same item without it breaking on either side.
Steps to reproduce
Get a player with an underscore in their name to use this kit. With the first item, it will show the underscores as spaces, showing the name wrong. In the second item, it will show all underscores as underscores, showing the date wrong.
test:
delay: 1
items:
- 'white_tulip 1 name:&f&lSpawn_Flower lore:&f{USERNAME}_joined_on_{DATE}'
- /minecraft:give {USERNAME} white_tulip{display:{Name:'[{"text":"Spawn Flower","italic":false,"color":"white","bold":true}]',Lore:['[{"text":"{USERNAME} joined on {DATE}.","italic":false,"color":"white"}]']}} 1