π»xWhitelist API
The xWhitelistAPI provides static methods to interact programmatically with xWhitelist. You can manage the whitelist, maintenance whitelist, and check plugin status directly from your code without creating an instance.
π Installation
First of all, add the repository and dependency of xWhitelist.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.xDrygo</groupId>
<artifactId>xWhitelist</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
After adding the dependency, add xWhitelist as dependency in your plugin.
name: MyPlugin
main: com.example.MyPlugin.MyPlugin
version: 1.0
depend: # depend if is necesary the API, soft-depend if is opcional use.
- xWhitelist
π xWhitelistAPI Methods
π General Whitelist Methods
π οΈ Maintenance Whitelist Methods
π‘ Notes
All API methods are static, so you do not need to instantiate
XWhitelistAPI
.Methods handle both local file and MySQL storage automatically.
Maintenance whitelist methods always operate on the staff whitelist file, even if MySQL is enabled.
Be sure to reload your configuration after modifying whitelist files if needed.
π References
Last updated