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>

Methods

AdvancedVanishAPI.vanishPlayer(player: Player): Unit
AdvancedVanishAPI.unVanishPlayer(player: Player): Unit
AdvancedVanishAPI.isPlayerVanished(player: Player): Boolean
AdvancedVanishAPI.canSee(player: Player, target: Player): Boolean

Extensions (Kotlin Only)

Events

  • PrePlayerVanishEvent - Gets called before vanishing a player, implements Cancellable

  • PlayerVanishEvent - Gets called after a player vanishes.

  • PrePlayerUnVanishEvent - Gets called before a player unvanishes, implements Cancellable.

  • PlayerUnVanishEvent - Gets called after a player unvanishes.

Example Usage

Last updated