The source for an easy to setup, lightweight plugin for your Spigot server written in Kotlin. Resource Page
The current version is no longer being maintained, v2 is underconstruction!
Since 1.5-RELEASE, there is real support for API usage. This API can be used for
- (Un)registering aliases, run conditions, placeholders
- Toggling an alias
- Processing a placeholder string
- Add "CommandAlias" as a dependency or soft dependency to your plugin.
- Add the jar to the dependencies (sorry no maven repo)
- EITHER listen on CAPluginReloadEvent (see the note below to see why)
- OR Get the instance of the plugin through JavaPlugin#getPlugin or through PluginManager#getPlugin
- Cast said instance to the CommandAliasAPI interface.
- Have fun
Register your aliases/placeholders/run conditions on the event CAPluginReloadEvent. Why? Because this event is called whenever the plugin is reloaded, including at startup. When the plugin is reloaded it will clear everything. Though, to do this, you have to load before CommandAlias so you can register before the event is called. Or you load after and register in your onEnable and then again when CAPluginReloadEvent is called.
- Make an instance of what you want to make (RunCondition/AliasCommand/CAHook)
- Register it with the API via the event. If you read the API it will become clear.
If you have any queries come to https://www.elliepotato.de/support