Closed Kanin closed 4 months ago
This is a rare edge case with our comments library which we use from https://github.com/tchristofferson/Config-Updater. Unfortunately I am not able to fix their parser. I recommend you convert lore into a list or find another storage design.
This is a rare edge case with our comments library which we use from https://github.com/tchristofferson/Config-Updater. Unfortunately I am not able to fix their parser. I recommend you convert lore into a list or find another storage design.
Changing it to a list seems to cause issues?
lore:
- "&7A basic scythe"
- "Right click to harvest crops"
- ""
- "&f&lCOMMON"
[11:25:22 INFO]: ___ _
[11:25:22 INFO]: / _ \ ___ _ __ ___| |
[11:25:22 INFO]: | | | |/ _ \| '_ \/ __| |
[11:25:22 INFO]: | |_| | (_) | |_) \__ \_|
[11:25:22 INFO]: \___/ \___/| .__/|___(_)
[11:25:22 INFO]: |_|
[11:25:22 INFO]: !-----------------------------------------------------!
[11:25:22 INFO]: Error loading Scythes v1.0-SNAPSHOT, plugin is disabled!
[11:25:22 INFO]: Running on 1.20.4-R0.1-SNAPSHOT & Java 18.0.2.1
[11:25:22 INFO]: !-----------------------------------------------------!
[11:25:22 INFO]: Error: while scanning an anchor
[11:25:22 INFO]: in 'string', line 25, column 9:
[11:25:22 INFO]: - COMMON
[11:25:22 INFO]: ^
[11:25:22 INFO]: unexpected character found &(38)
[11:25:22 INFO]: in 'string', line 25, column 11:
[11:25:22 INFO]: - COMMON
[11:25:22 INFO]: ^
[11:25:22 INFO]: !-----------------------------------------------------!
Doesn't seem to be a valid YAML construct in YAML 1.1, sorry. You can either disable comments by overriding the likenamed method, or use bukkit's 1.16+ yaml implementation with comments support to workaround this temporarily. I don't have the time right now to rewrite the third party parser, I apology.
Doesn't seem to be a valid YAML construct in YAML 1.1, sorry. You can either disable comments by overriding the likenamed method, or use bukkit's 1.16+ yaml implementation with comments support to workaround this temporarily. I don't have the time right now to rewrite the third party parser, I apology.
Do you plan to do so eventually? I feel like this is a rather large issue for the config management being the fact that even if we don't use these strings in our default configs, we cannot prevent server owners from doing so... and in turn corrupting their config.
Also, just found out... even setting lore to lore: "&7A basic scythe\nRight click to harvest crops\n\n&f&lCOMMON"
in my default settings.yml, deleting my plugins folder, restarting the server... it sets lore to
lore: |-
&7A basic scythe
Right click to harvest crops
&f&lCOMMON
This is a big issue, it literally does not let me write anything that works?
Can you please open a ticket at https://github.com/tchristofferson/Config-Updater? He's the maintainer of that config class
Can you please open a ticket at https://github.com/tchristofferson/Config-Updater? He's the maintainer of that config class
Could you not just replace it with a better one?
Feel free to suggest 1.7.10-1.20.6 compatible alternative. The bukkit's one only supports 1.16+
Can you please open a ticket at https://github.com/tchristofferson/Config-Updater? He's the maintainer of that config class
What are the odds it gets seen? You've had an issue there open for over a year, and it's been nearly that long since the project has even had a proper update.
In my opinion it's a rather large flaw in the library, being configuration is the center of everything.
Feel free to suggest 1.7.10-1.20.6 compatible alternative. The bukkit's one only supports 1.16+
Alright https://github.com/Carleslc/Simple-YAML, https://github.com/Osiris-Team/Dyml and https://github.com/Exlll/ConfigLib . I think on one other library (but not sure), but fail to find it.
Can you please open a ticket at https://github.com/tchristofferson/Config-Updater? He's the maintainer of that config class
What are the odds it gets seen? You've had an issue there open for over a year, and it's been nearly that long since the project has even had a proper update.
In my opinion it's a rather large flaw in the library, being configuration is the center of everything.
Don't know how active he is today. But he did fix some critical bugs last time. Even if he is not so active. It is little fun he has not yet approved to master branch the javaDoc I added to all methods still.
I'll ping him. I can't update to his latest version due to that ticket :/ I don't have the capacity to manage 100% of a large scale library, but since it's open source you can make a pull request. Or revert to Bukkit config or these libs above broken1arrow suggested. Hope you understand.
Here's the YAML docs on block strings
Steps to reproduce
Add a multi-line string to your settings file, e.g:
Notice the multi-line string has been changed to:
SimpleSettings class & settings.yml
Relevant Files