SpongeAPI 4.1.0 is now officially released! While there have not been a great many changes, the implementation has seen a great many changes and improvements over the last few months. It is now recommended that developers target at least SpongeAPI 4.0.3 as 3.X has not received any implementation updates. As mentioned in the past, the next API release is targeting Minecraft 1.9 and as such, API 4.X is dubbed LTS. Both implementations will likewise remain in LTS for Minecraft 1.8.9, however previous versions of the API (including API 3.x) will NOT be receiving updates and fixes.
Are my API 4.0 plugins going to break?
NO! They will not! The beauty of the API is that as long as the major version has not changed, plugins written for that version will not break.
A commit comparison between 4.0.0 and 4.1.0 can be seen here.
- Asset.readLines and try-with-resources for
- Updates to slf4j-api
TextFormats are now
AbstractDataBuilderfor unified version upgrading processes
- Add methods to create
- Add support for generating dummy instances of classes, changes all the default
CatalogTypes available in catalogs to non-null objects (aids in IDE null checking)
- Improved usability of
Keys with cached hashing
CollectionUtils for copying maps.
World#spawnEntitiesfor spawning a collection of
BookViewAPI, allows developers to present a
BookGUI on clients without using a real
- Add Virtual Block Change API to send block changes to clients without affecting the server world
- Add DataSerializer API for objects that are unable to implement
DataSerializable, adds default support for
UUIDs, Flow Math, and several other classes
BlockSnapshot.NONEfor air blocks
AttackEntityEvent, a sister event to
DamageEntityEventspecifically called before an
Entityand allows modifying the output of damage (separation of focuses for incoming damage versus outgoing damage)
DataHolder#tryOffermethods for developers who prefer throwing exceptions if Data is not supported
@GetterEvent Filtering to allow filling parameters of event listeners with an automatic method caller
ArmorStandData, deprecates previous methods that were used in its place
- Add methods to
Worldis now a
- Allow getting and setting
GameReloadEventfor when a plugin is requested to perform a soft reload of various things, notably to request a reload of any configurations possible. This is NOT a full plugin reload where the class path is reloaded. The implementation of this event in plugins is entirely up to the plugin developer.
- Add utility methods for retrieving all
CatalogTypes registered by a plugin
- Refactor Teleporter API, the previous API was never implemented, however plugins NEED to target the new API (API 4.1.0) to make use of it. There were many changes made to the implementation and API is now fully implemented.
We (the Sponge Team) hope that you enjoy this update and wish to continue updating the implementations for Minecraft 1.8.9 as any bugs are found.
What about development for 1.9? I saw some commits and some issues about that...
1.9.4's development is nearing stability, however the limited amount of testing performed by the few developers who have spent the most time with it are not able to guarantee that the implementations targeting 1.9.4 are bug free. SpongeVanilla and SpongeForge are now releasing builds for 1.9.4, however, please please please make backups before the server crashes them. Also, please note that bleeding is targeting API 5.0.0-SNAPSHOT, so plugins are likely to break if a specific part of the API they use was changed.
Will the docs be updated?
@Inscrutable and the SpongeDocs team already have been working on making the jump to 4.1.0, but have stated that they will stick with "whatever is the latest release". That being said, they will be updating the docs soon.