ArVdC / TimeManager

Bukkit plugin for time management and display
https://dev.bukkit.org/projects/mc-timemanager/files
Eclipse Public License 1.0
7 stars 3 forks source link

lang.yml config resets with every restart #11

Closed ZECHEESELORD closed 2 years ago

ZECHEESELORD commented 3 years ago

I have a couple of questions:

Basically all edits made to the lang.yml config file resets on either reload or restart. I'm not sure if this is intended to help avoid YAML formatting errors, or a bug. I'd be very thankful if you could help me resolve this issue.

If you need debug/server logs, please let me know!

ArVdC commented 3 years ago

Hi,

No one else has reported this bug to me yet. I think the file is resetting because of the special characters. This is the usual reaction to a syntax problem in a yaml. Have you tried deleting the lang file, recreating it, then editing it without any special characters? I have never tried using symbols yet, I will give it a try and keep you posted.

Colors work as long as you fix the other problem first.

ZECHEESELORD commented 3 years ago

Thank you for the reply, I really appreciate it!

I will try your solution, will there be support for special characters in the future? Or is this not planned?

ArVdC commented 3 years ago

In fact, I didn't have to think about supporting special characters at all. It's good that you are asking me about this. I don't have time for the moment but I will definitely do it soon.

ArVdC commented 3 years ago

I have done some tests and it is possible to use some symbols but not all. Place the message text between " " and then use unicode, for example \u263d is for the quarter moon ☽ and \u2600 is for the sun ☀. Check the hex codes here : https://www.w3schools.com/charsets/ref_utf_symbols.asp

ZECHEESELORD commented 3 years ago

Alright thanks for the help! I will try this in a bit (busy atm) and I'll let you know the results. Just to make sure, it should look something like this?

"\u263d" and "\u2600"

Thanks again!

ArVdC commented 3 years ago

Yes, something like night: "\u263d" will work. You can also add text and color day: '&6\u2600 day&f'

But, in fact, ... copying and pasting symbols also works. The notepad allows you to view directly if the symbol is recognized.