Feature Flags

What is a feature flag?

With a feature flag, you can add special flags at the beginning of your script to enable features that may bypass certain safety restrictions provided by the plugin.

Example usage of a feature flag:
//!featureflagnamehere

Available feature flags:

//!loadmanually

With this feature flag placed at the top of your script, the script will not load automatically when the plugin starts or reloads. It will only be loaded if another script explicitly loads it, or if you load it manually using the load command.

//!waitForInit

With this feature flag placed at the top of your script, the script will yield (pause execution) until the plugin has been fully initialized. This should be used if you're calling the LoadScript(scriptName) function during plugin startup. In general, you should avoid manually loading scripts while the plugin is still starting or loading.

//!PlaceholderAPI

This feature flag indicates that the script will use PlaceholderAPI components, such as PlaceholderAPI.registerPlaceholder() and PlaceholderAPI.parseString(). In general, this allows the script loader to enable PlaceholderAPI support specifically for scripts that include this feature flag.

Feature flags will be ignored if they have been disabled in the configuration file

Last updated