Pocketkid2 / Fill

A Bukkit/Spigot plugin for Minecraft servers
MIT License
2 stars 5 forks source link

1.14.4 support #5

Closed TylerS1066 closed 2 years ago

TylerS1066 commented 3 years ago

Can you add 1.14.4 support? It should be as simple as changing the API version down to 1.14.4 in the pom and plugin.yml.

Pocketkid2 commented 2 years ago

I've updated it to 1.18 this week

TylerS1066 commented 2 years ago

I'd prefer if you actually read my request and implemented 1.14 support...

Pocketkid2 commented 2 years ago

You want backwards compatibility? I can make a branch for that

TylerS1066 commented 2 years ago

You don't need to branch for it. Your plugin doesn't use any new API features that aren't available in 1.14 so you can merely leave the api-version as 1.14 and build against 1.14.

Spigot and its forks won't complain about an older (but post 1.13) plugin being run on a newer version like 1.18. It will however not allow a 1.18 api-version plugin to run on anything before 1.18.

All of the Movecraft addons that the APDevTeam codes and Movecraft itself use an api-version of 1.14 and build against the 1.14.4 spigot api. Movecraft's version specific worldhandlers do depend on their specific Spigot version, but that's solely to access NMS.

Pocketkid2 commented 2 years ago

Fair point, but I decided to make a branch anyway. I'm curious though, why does Movecraft build for 1.14? Is there a reason why that is preferred over the latest?

TylerS1066 commented 2 years ago

Movecraft builds for 1.14.4 since we support down to 1.14.4.

The Spigot API rarely removes functionality on updates, but it often adds them. That way, if we build against the oldest version we support, then all the functions we use will still exist on the latest version (currently 1.18.1). A good way to double check is to change the version to build against the latest locally, run a build, and that will warn you if there are any API removals that affect your plugin.

Where we need to use a newer function, we either use reflection (like to get min world height here or the WorldHandler system.

For the most part though, we try to avoid using functionality in Spigot that's not available all the way down to 1.14.4. While this policy limits us (for example, arrow directors don't exist because of API functionality to support it only existing in 1.15+), it also means we can support a wide range of servers. Especially in this transition period between Movecraft 7 and its 1.10.2 to 1.12.2 support to Movecraft 8 with its 1.14.4 to 1.18.1 support it's important for us to help servers transition.

In an ideal world, I think that supporting 2-3 versions is best. Supporting more than that means we have a much wider spread in the capabilities of the Spigot API and far more duplicated code in the various WorldHandlers, but also more variety in how the WorldHandlers work. On the other hand, supporting less than 3 versions usually means that the slowest servers to update are losing the latest features and bugfixes since they are getting their support dropped.

There are some who try to add more support, like Eirik's fork with it's 1.8 to 1.18 support, but the ballooning number of worldhandlers quickly decreases the ease of major internal updates (like improving performance, another core goal).