How to Use the API
SayanVanish contains an extensive API to perform all necessary actions. To start, add the SayanVanish dependency to your build tool of choice, such as Maven or Gradle.
Adding the Repository
In Maven
In Gradle
Groovy
Kotlin
Adding the Dependency
You can use different platform-specific dependencies or the main platform-independent API.
Main API Dependency
The dependency artifact for the main API is sayanvanish-api
.
Platform-Specific Dependencies
For platform-specific dependencies, the artifact ID follows the format sayanvanish-<platform>
. Examples include sayanvanish-bukkit
and sayanvanish-proxy-velocity
.
In Maven
In Gradle
Groovy
Kotlin
Accessing the API
You can access the SayanVanish API like this:
Or you can use a platform-specific user type like this:
Or like this:
From this class, you can access and modify everything. For example, to add a new user:
Or to access the database directly:
Events
There are two Bukkit-specific events you can use: BukkitUserVanishEvent
and BukkitUserUnVanishEvent
. Both events contain the user and vanish options.
For further details and advanced configurations, please refer to the subsequent sections.
Last updated