OskarsMC-Plugins / send

Plugin to send players to servers on Velocity! (Previously VelocitySend)
MIT License
22 stars 5 forks source link

Upgrade MiniMessage to latest (v4.10.1) #7

Closed BetTD closed 2 years ago

BetTD commented 2 years ago

This PR updates the dependency to its latest available version and makes the appropriate modifications to the code. Notably, the MiniMessage#parse() method has been completely removed from the library, and now MiniMessage#deserialize() must be used. The trickiest part was figuring out the API changes, since they appear to be fairly undocumented.

Tested on latest Velocity build (3.1.2-SNAPSHOT-121).

4drian3d commented 2 years ago

Instead of continuing to shade minimessage, I think it would be better to upgrade to the latest velocity snapshot that includes minimessage and thus be able to use the version that velocity includes (4.10.0). And the Minimessage API is already well documented and even has javadocs available since version 4.10.0

BetTD commented 2 years ago

I've considered doing that as well, but since I'm unaware of the author's wishes I just stuck to updating what was necessary. Shading a dependency that is already present during runtime serves no purpose really.

I know MiniMessage has docs, it's just the change that hasn't been documented much.

BetTD commented 2 years ago

I was unable to find a more up to date version of the velocity-api package that includes the latest Adventure API, but since Velocity itself should provide the library, we can just set the scope to provided and it should work™️

eugeniodevv commented 2 years ago

Bump, works great on latest Velocity

OskarZyg commented 2 years ago

I'll test it myself, but I'd preferably wait for the paper team to release a stable velocity version before creating another release of send.

BetTD commented 2 years ago

Thing is, I believe most people are going to use the latest Velocity snapshots

4drian3d commented 2 years ago

I was unable to find a more up to date version of the velocity-api package that includes the latest Adventure API, but since Velocity itself should provide the library, we can just set the scope to provided and it should worktm

In order to get the latest velocity snapshot available, change the Velocity repository to the PaperMC repository "https://papermc.io/repo/repository/maven-public/"

BetTD commented 2 years ago

I was unable to find a more up to date version of the velocity-api package that includes the latest Adventure API, but since Velocity itself should provide the library, we can just set the scope to provided and it should worktm

In order to get the latest velocity snapshot available, change the Velocity repository to the PaperMC repository "https://papermc.io/repo/repository/maven-public/"

Oh neat, didn’t know that, thanks

OskarZyg commented 2 years ago

Works just fine on velocity 3.1.2-SNAPSHOT build 125. I'll wait for velocity 3.1.2 to release the next version of send.