Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy formatting codes have been detected in a MiniMessage string #766

Closed
3 tasks done
Incluuu opened this issue Jul 28, 2024 · 5 comments
Closed
3 tasks done

Legacy formatting codes have been detected in a MiniMessage string #766

Incluuu opened this issue Jul 28, 2024 · 5 comments
Assignees
Labels
resolution: not a bug Issue is not a bug

Comments

@Incluuu
Copy link

Incluuu commented Jul 28, 2024

Spark link

No response

Plugin Version

v1.21-74

Server Version

1.21

Server Platform

Purpur

Describe the bug

  1. Set use-old-editor to true
  2. error https://pastebin.com/QfFr5NuN
  3. open error https://pastebin.com/UV7nAqLK

Crate Type

None

Steps to reproduce

  1. add item with name and lore /crates additem CrateExample 9 90
  2. console error
  3. and open crate
  4. console error

Additional context

/crates additem CrateExample 9 90
[11:31:24 WARN]: [CrazyCrates] There was an error while loading the CrateExample.yml file.
net.kyori.adventure.text.minimessage.internal.parser.ParsingExceptionImpl: Legacy formatting codes have been detected in a MiniMessage string - this is unsupported behaviour. Please refer to the Adventure documentation (https://docs.advntr.dev) for more information.
§e§lHay Block
^^
at net.kyori.adventure.text.minimessage.internal.parser.TokenParser.parseString(TokenParser.java:170) ~[adventure-text-minimessage-4.17.0.jar:?]

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I ticked all the boxes without actually reading them
  • My version of Minecraft is supported by CrazyCrew.
@Incluuu Incluuu added the type: bug A bug with the resource label Jul 28, 2024
@ryderbelserion
Copy link
Member

ryderbelserion commented Jul 28, 2024

You can't use the old item editor without turning off MiniMessage.

There is no way around it that I am willing to do. I will update the comment, but nothing more.

The toggles are for people who dont want to migrate yet.

@ryderbelserion ryderbelserion added resolution: not a bug Issue is not a bug and removed type: bug A bug with the resource labels Jul 28, 2024
@Incluuu
Copy link
Author

Incluuu commented Jul 28, 2024

Will the old system work all the time in the future, because I don't want to migrate either?

@ryderbelserion
Copy link
Member

ryderbelserion commented Jul 28, 2024

It will not. once legacy color codes are removed, it goes as well. the 2 options are linked with each other.

previously added items will work if under Editor-Items internally always but no new items could be added.

@Incluuu
Copy link
Author

Incluuu commented Jul 28, 2024

When do you plan to remove the old color codes? and why can't old color codes stay forever?

@ryderbelserion
Copy link
Member

ryderbelserion commented Jul 28, 2024

Paper going to eventually remove them completely, The only reason they are still here is because Spigot was a hold out and kept the implementation, but also put no time into developing an alternative that I know of while Mojang had dropped support for it.

We now have an alternative called Kyori/MiniMessage developed in the past couple years that is based directly on Mojang's changes 13 years ago which was Strings -> Components and this library allows adding new features for plenty of things that would require a lot of hacky changes.

They can't stay forever because they just won't exist in paper's server code anymore. that's the only reason they even work.

Legacy Color Codes open a gateway to a plethora of unsupported and oddball formats that lead to headaches in maintaining configurations as people do odd things to get gradients to work which migrators freak out on requiring more manual work.

Legacy Example:
&#084CFBb&#2064FBi&#377CFCr&#4F94FCd&#66ABFCf&#7EC3FCl&#95DBFDo&#ADF3FDp

This is how you would previously do a gradient from https://www.birdflop.com/

Today's Example:
<gradient:#084CFB:#ADF3FD>birdflop</gradient>

I myself have a lot of problems reading the legacy color gradients, my eyes actually get strained from it and I know I am not the only one with that issue.

Legacy Color Codes have multiple oddball formats, MiniMessage is one unique standard that is implemented on Fabric, Forge, Velocity, Paper, so in the event that I expand to multiple platforms. The color format would not change so configurations can stay the same.

It is the same reason I elected internally to use mojang mapped ids as to also allow people to port their configurations to other server types without having to worry about much things.

@ryderbelserion ryderbelserion pinned this issue Jul 28, 2024
@ryderbelserion ryderbelserion changed the title PlayerInteractEvent to CrazyCrates v1.21-74 Legacy formatting codes have been detected in a MiniMessage string Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: not a bug Issue is not a bug
Projects
None yet
Development

No branches or pull requests

2 participants