API
Before utilizing the API, make sure that the AdvancedVanish plugin is enabled by addingdepend: [AdvancedVanish] or softdepend: [AdvancedVanish] to your plugin's plugin.yml.
Even though AdvancedVanish was made in Kotlin, the API can still be accessed from Java.
Adding the Dependency
Add this repository to your pom.xml:
<repository>
<id>repsy</id>
<name>quantiom</name>
<url>https://repo.repsy.io/mvn/quantiom/minecraft</url>
</repository>Add the dependency and replace <version>...</version> with the current version:
<dependency>
<groupId>me.quantiom</groupId>
<artifactId>advancedvanish</artifactId>
<version>1.2.2</version>
</dependency>Add this repository to your build.gradle:
allprojects {
repositories {
...
maven { url 'https://repo.repsy.io/mvn/quantiom/minecraft' }
}
}Add the dependency and replace the version with the current version:
dependencies {
implementation 'me.quantiom:advancedvanish:1.2.2'
}Methods
AdvancedVanishAPI.vanishPlayer(player: Player): Unit
AdvancedVanishAPI.unVanishPlayer(player: Player): Unit
AdvancedVanishAPI.isPlayerVanished(player: Player): Boolean
AdvancedVanishAPI.canSee(player: Player, target: Player): BooleanExtensions (Kotlin Only)
Events
PrePlayerVanishEvent- Gets called before vanishing a player, implementsCancellablePlayerVanishEvent- Gets called after a player vanishes.PrePlayerUnVanishEvent- Gets called before a player unvanishes, implementsCancellable.PlayerUnVanishEvent- Gets called after a player unvanishes.
Example Usage
Last updated