ServerlistMOTD X

ServerlistMOTD X

90.1k Downloads

Can i use UTF-8 codes somehow?

ShDis opened this issue · 5 comments

commented

For instance
scr

RandomMotd:
Enable: true
Regulars:
- '&b%player% &d\u043e\u043f\u044f\u0442\u044c \u0437\u0430\u0431\u043b\u0443\u0434\u0438\u043b\u0441\u044f \u0432 %line%\u043a\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438&r'

But in servers.properties it works fine
scr2

commented

Hey there, this is a known behaviour. I might add support for this kind of unicode notation in the future. But in the meantime: Have you tried using the cyrillic letters directly instead of using the unicode representation in the config.yml? For me at least, I can use cyrillic letters directly in the config. Let me know! :)

For example:

Regulars:
- '&bсобака'
commented

Yep, i've tried using cyrillic directly at first. Tried again after updating Protocol Lib and Paper - still looks like this
scr3

commented

I might have found a very easy quick fix you could try: Instead of wrapping the motd texts in a single quote ' try wrapping them in a double quote " everywhere you use the unicode representation of the cyrillic letters. This allows the correct escaping with \u.

So instead of:

RandomMotd:
  Enable: true
  Regulars:
  - '&b%player% &d\u043e\u043f\u044f\u0442\u044c \u0437\u0430\u0431\u043b\u0443\u0434\u0438\u043b\u0441\u044f \u0432 %line%\u043a\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438&r'

Bildschirmfoto 2020-11-14 um 16 46 47

Do this:

RandomMotd:
  Enable: true
  Regulars:
  - "&b%player% &d\u043e\u043f\u044f\u0442\u044c \u0437\u0430\u0431\u043b\u0443\u0434\u0438\u043b\u0441\u044f \u0432 %line%\u043a\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438&r"

Bildschirmfoto 2020-11-14 um 16 47 12

Let me know if this helped.

commented

Yay, that works. Thanks ^-^
Now i must put there like 20+ random motds :)

commented

Oh, that is great to hear! Have fun coming up with 20+ random motds 😆
Amazing server icon btw 🐱