Commands with single quotation won't work
ColdeZhang opened this issue ยท 2 comments
Describe the bug
Can't load config file while PlayerKills.CommandsOnKill
section was set with commands containing something like '
.
To Reproduce
Steps to reproduce the behavior:
- Set section
PlayerKills.CommandsOnKill
withminecraft:give <player> minecraft:name_tag{display:{Name:'"=TITLE="',Lore:['"LINE ONE"','"LINE TWO"']}} 1
. - Then reload it.
Expected behavior
The config backup file (config.old.yml) will be loaded, what we set won't in effect.
Plugin and Server version
Server: paper-1.18.1
Pugins: 3.9
Additional context
I tried change commands to minecraft:give <player> minecraft:name_tag{display:{Name:\'"=TITLE="\',Lore:[\'"LINE ONE"\',\'"LINE TWO"\']}} 1
, and it still doesn't work.
That's unrelated to this plugin, it's due to how yaml parses the config files, you could use a yaml validator like this https://onlineyamltools.com/validate-yaml to help solve the issue. I'm not sure how to make that work.
Thanks for your suggestion!
It's truly YAML grammar error, I change my config with something like below:
Player Kills:
Money Reward: 0
Money Penalty: 0
Money Steal: false
Commands On Kill: >-
minecraft:give <player> minecraft:name_tag{display:{Name:'"=TITLE="',Lore:['"LINE ONE"','"LINE TWO"']}} 1
WorldGuard Exclusions:
- 'exampleregion'
>-
means next line is a string data without line warp, this kind of usage don't need quotations to indicate data type.