Behavior Providers
Technical Information
In Honeypot, a Behavior is a custom action type that is registered via a plugin rather than defined as a Custom Honeypots Action. A behavior allows developers to programmatically process a Honeypot instead of just running basic server commands. Behavior providers can be as complex or simple as you make them. The native actions in Honeypot are actually behavior providers, as well!
When the server loads, Honeypot allows registration of Behavior Providers via its onLoad() method. Once loaded, Honeypot stores all of those providers in its internal registry. Behavior providers take precedence over Custom Honeypot Actions
Creating a Behavior Provider
Creating a behavior provider is just as simple as the storage provider. Create a class that extends BehaviorProvider and annotate it with the @Behavior annotation. This annotation requires a type, name, and icon. Currently, type is unused, but be sure to label it properly as it may be used in the future.
Once you have your provider created, you can register it the same way you did your Storage Provider in your onLoad() method
Configurable Providers
Honeypot allows providers to create their own configuration files within Honeypot's own data folder. These are provided to your plugin's process() method. If your Behavior is not marked configurable in the annotation, a configuration file will not be generated and the config argument will be null.
At the current time, Honeypot unfortunately cannot generate default configurations. Developers should be mindful of providing default values for their configurations.
The configuration object provided is from the BoostedYAML library. You can learn more here.