Sueta

AdvancedVanish

1.2.6

A fully customizable and advanced vanish plugin made with Kotlin.

·Plugin

AdvancedVanish [1.8 - 1.19]
AdvancedVanish is a fully customizable and advanced vanish plugin made with Kotlin.

https://quantioms.gitbook.io/advancedvanish/

Features

  • Fully customizable through the config. (70+ options)
  • Vanished players are completely invisible, as if they are not even online.
  • Vanish priorities/levels (more info in the config)
  • Supports many different permissions plugins. (LuckPerms, PermissionsEx, bPermissions, GroupManager)
  • Many configurable hooks which provide support to other plugins.
  • Togglable Actions when vanished (15+)
  • Cross-server Vanish Synchronization
  • Commands: (permissions are customizable in the config)
    • /vanish - Toggles vanish.
    • /vanish reload - Reloads the config and hooks
    • /vanish priority - Displays your vanish priority.
    • /vanish list - Displays a list of vanished players.
    • /vanish status <player> - Check if a player is in vanish
    • /vanish set <player> <on/off> - Set another player's vanish
    • /vanish toggle <player> - Toggle another player's vanish
  • For more info and the rest of the features, check out the GitBook page.

API

API Information

Before utilizing the API, make sure that the AdvancedVanish plugin is
enabled, or add depend: [AdvancedVanish] or softdepend: [AdvancedVanish] to
your plugin's plugin.yml.

Maven
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

Player.isVanished(): Boolean

Events

  • PrePlayerVanishEvent - Gets called before vanishing a player, implements Canellable.
  • PlayerVanishEvent - Gets called after a player vanishes.
  • PrePlayerUnVanishEvent - Gets called before a player unvanishes, imeplements Cancellable.
  • PlayerUnVanishEvent - Gets called after a player unvanishes.

Example Usage

class ExamplePlugin : JavaPlugin(), Listener {
    override fun onEnable() {
        this.server.pluginManager.registerEvents(this, this)
    }

    @EventHandler
    private fun onVanish(event: PlayerVanishEvent) {
        val vanishedPlayers = AdvancedVanishAPI.vanishedPlayers
            .map(Bukkit::getPlayer)
            .joinToString(", ", transform = Player::getName)

        this.logger.log(Level.INFO, "${event.player.name} has entered vanish.")
        this.logger.log(Level.INFO, "Current vanished players: ${vanishedPlayers}.")
    }

    @EventHandler
    private fun onUnVanish(event: PrePlayerUnVanishEvent) {
        event.isCancelled = true // Don't let players unvanish
    }
}

Similar projects

Plugin →