API changes
Compatibility
- Changed Recipe.getResult function signature (from collection of items to a single item) since the game does not allow recipe result amounts more than 1. This unfortunately can not be backwards compatible since the method name is the same and Haxe does not support this kind of overloading.
- Updated to Haxe 4.3.1.
Additions
- Expanded the ItemFactory: aside from just the material name, it now allows you give it the same input that Minecraft's /give command accepts to create items, allowing you to create much more detailed items.
- Added executeCommand(command, arguments) to Game. This allows you to let the console execute any command (both vanilla and plugin commands) from your plugin's code.
- Using key "meta" in Item's getValue and setValue functions, you can access the item's MetaData. However, this only works for potion types, as deserializing items is hardly possible in Spigot. Below is an example on how to change a potion's type to invisibility of 8 minutes:
item.setValue("meta", "POTION_META:{meta-type=POTION, potion-type=minecraft:long_invisibility}");
For now it is better to use the new ItemFactory functionality instead, if possible.
Loader changes
Compatibility
- Plugins written for previous versions that add a crafting recipe may not be compatible with this version and need a small update if they are not.
- The api-version values in plugin.yml is changed from 1.19 to 1.13 to allow using the loader on older Spigot versions.
- Haxe has been updated to 4.3.1 (which probably does not impact compatibility).
New features
- Items can now be created from the same input that Minecraft's /give command accepts, allowing plugins to create much more detailed items.
- Plugins can now execute any "slash" command from code.
- Methods getValue and setValue on Items now grants access to some underlying metadata. As of now this probably only works for potion types.
- The console now displays thread priority for Haxe plugins aside from thread count.
- Added a timeout of 2 minutes to all threads that are run from the loader (from Haxe plugins).
- Better error logging: the stacktrace of anything Throwable is now printed from anything executed in the thread pool (including plugin code). Previously, anything thrown that was not an Exception would just be ignored.
- Better handling of plugin enable/disable error logs.
Bug fixes
- Fixed SpawningItemFactory not able to spawn items that also exist as entity (reported by Frizzus).
- Small bug fixes in version checking.
- Fixed ShapedRecipe not registering correctly (reported by Frizzus).
Miscellaneous
- Updated Reflections API from 0.9.12 to 0.10.2 (latest) and refactored related deprecated code.