π¨οΈInterchanges
The commands, with some Sparkle
Interchange constructors and the names of some properties may slightly change in upcoming future version PRE-20. Stay tuned!
What are Interchanges?
Interchanges can quite simply translate to commands with automation and systems hidden in the background, to ensure a good user experience.
They help to easily construct heavy and complicated structures without having to look at cluttered code or needing a master's degree in science and space engineering.
The interchanges help you concentrate on the important things of creating interchanges, but how? Let's look at an example:
This is a simple Interchange, with simple and fully coded functionality. No input checks, just some background systematic, enough to be an easy-to-go solution.
You can see, that the execution property is the code block, which will be invoked asynchronously if the executor performs the command/interchange properly.
In the constructor, we can see some setup lines, which set the command name, aliases, and if the interchange execution requires permission. Some of these things are normally registered via the plugin.yml file, but Sparkle automatically registers the added interchanges into the runtime representation of this file, so you don't have to specify the commands in your plugin.yml
There are more properties available for classic Interchanges:
forcedWrongUsageReaction: InterchangeReaction?
is a new feature, introduced in 1.0.0-PRE-20, to override wrong-usage reaction
These are the properties, which can be modified. Some of them are nullable and by default null, which is 'modifiers'. This means, if they are null, the default-generated ones will be chosen. But if not null, these will be used instead of the default ones.
Last updated