[SPIGOT-2922] Compatibility-breaking changes to the Bukkit API Created: 16/Dec/16  Updated: 16/Dec/16  Resolved: 16/Dec/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Siguza Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: API, Bukkit, Craftbukkit


 Description   

Since the release of Spigot-1.11, there have been at least two changes to the Bukkit API that completely broke existing code that used it, and which happened without any kind of version bump or deprecation notice.
The changes I'm talking about were made to the constructors of the BrewEvent and PrepareItemEnchantEvent classes.
A similar change was also made to a CraftBukkit class, CraftInventoryAnvil.

This has now three times lead to the situation that I updated a plugin of mine, only to find that by the time people downloaded it, Spigot had changed underneath it and my plugin was crashing again.
Is this the way it should be?

As far as I'm aware, back in the Bukkit days compatibility-breaking CraftBukkit changes would always come with a package version bump (I understand that CraftBukkit is not meant to be stable, but still, that's exactly what the package version is for, isn't it?), and compatibility-breaking Bukkit API changes would only happen after the features in question had been marked as deprecated for quite some time.
It seems to me that Spigot continued this up until and including version 1.10.

So I'm asking: Is there an official policy on how to handle compatibility-breaking changes in Bukkit and CraftBukkit code? And if so, do the changes I mentioned comply with it? If not, could you please fix that, e.g. by adding back legacy constructors with the old signature?

Thanks.



 Comments   
Comment by md_5 [ 16/Dec/16 ]

Some changes are pretty much impossible to account for changes in backwards compatibility and these are two examples of them.
It is not expected behaviour that plugins construct events so there is not much reason to delay much needed API changes with major releases.

CraftBukkit has absolutely no guarantees to ABI, and the Bukkit changes were done with the justification above.

Generated at Tue Apr 22 04:20:19 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.