Skip to content
Andrew edited this page Dec 17, 2020 · 4 revisions

Unstable API's

ACF May publish Unstable API's as part of the deployed artifact to be used by those who are wanting to use the bleeding edge in development API's that have not been finalized.

New API's as Unstable

Major new PR's that add significant API should always be developed and tagged as Unstable, and we will remove the tag once finalized.

Risks

Any developer who makes use of an Unstable API (An API marked Deprecated and UnstableAPI annotation), accepts that the API in question is unstable, and the method signature may change.

This means you may be compiling your plugin testing changes, and then ACF publishes a new version with a change to the API.

You then compile 5 minutes later and pull down the new ACF version, and then your plugin no longer compiles.

If you're ok with this risk, then go ahead and use the API.

Enabling Unstable API

You must first call CommandManager.enableUnstableAPI("apiName"); before touching any unstable API.

If you do not, the method will throw an exception.

Current Unstable API's

help - Automatic help message generation

This API will help in printing every potential command for the Root Command that the user issued. The design of what it prints, formatting, and pagination may still need to be changed.

Enable this API with manager.enableUnstableAPI("help");

brigadier - Access to Minecraft 1.13+ Brigadier command system

Enable this API with manager.enableUnstableAPI("brigadier");

API's Added (this list may not be up to date)

BaseCommand#getCommandHelp
CommandManager#obtainCommandHelp
HelpEntry
CommandHelp