Error adding a permission
cancabron opened this issue · 1 comments
I want to add a permission from Modifyworld but it haves a colon... This is my config:
ANY:
- trigger: RIGHT_CLICK
tool: ENCHANTED_BOOK~&4&lFormula
command: [/$pex user %p add modifyworld.items.craft.267:?*, /$pex user %p add -otherdrops.custom.esphierro, /$pex user %p add otherdrops.custom.1esphierro]
permission: esphierro
consumetool: 1
- trigger: RIGHT_CLICK
tool: ENCHANTED_BOOK~&4&lFormula
message: "&4[!] &cYa aprendiste esa formula."
permission: 1esphierro
The config is OK, and if i dont insert the [] for multiple commands it works, but if i add the [] this appears:
2013-10-17 18:41:26 [INFO] �[m[OtherDrops:2.8b.573] �Loading file: otherdrops-drops.yml�
2013-10-17 18:41:26 [INFO] Config is invalid!�
2013-10-17 18:41:26 [INFO] The error was:
org.bukkit.configuration.InvalidConfigurationException: while scanning a plain scalar
in 'string', line 64, column 21:
command: [/$pex user %p add modifyworld.it ...
^
found unexpected ':'
in 'string', line 64, column 66:
... add modifyworld.items.craft.267:?*, /$pex user %p add -otherdro ...
^
Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.
�[m
2013-10-17 18:41:26 [INFO] You can fix the error and reload with /odr.
2013-10-17 18:41:26 [INFO] [OtherDrops:2.8b.573] Config is invalid!
2013-10-17 18:41:26 [INFO] [OtherDrops:2.8b.573] The error was:
org.bukkit.configuration.InvalidConfigurationException: while scanning a plain scalar
in 'string', line 64, column 21:
command: [/$pex user %p add modifyworld.it ...
^
found unexpected ':'
in 'string', line 64, column 66:
... add modifyworld.items.craft.267:?*, /$pex user %p add -otherdro ...
^
Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.
Greetings!
Sorry I didn't see this one when it was posted but you just need to surround each option in quote marks so that YAML doesn't try to process the colon differently. e.g.:
command: ["/$pex user %p add modifyworld.items.craft.267:?*", "/$pex user %p add -otherdrops.custom.esphierro", "/$pex user %p add otherdrops.custom.1esphierro"]