API interface for interacting with EssentialsC's vanish system. Manages player invisibility, hiding from other players, tab list, mob targeting, and collisions. Supports permission-based visibility for staff members.
Retrieve an instance via EssentialsCAPI.getVanishApi().
VanishApi vanish = APIProvider.getAPI().getVanishApi();
if (!vanish.isVanished(player)) {
vanish.vanish(player);
}
Method Summary
| void |
vanish(Player player) Hides the player from other players without the vanish.see permission. |
| void |
unvanish(Player player) Reveals the player to all other players. |
| boolean |
isVanished(Player player) Returns whether the player is currently vanished. |
| Set<UUID> |
getVanishedPlayers() Returns an unmodifiable set of all currently vanished player UUIDs. |
| void |
toggle(Player player) Toggles vanish state for the given player. |
| boolean |
canSeeVanished(Player player) Returns whether the player can see vanished players. |
| void |
reload() Reloads the vanish configuration from disk. |
Hides the player from other players without the essentialsc.vanish.see permission. Applies configured effects (night vision, collision disable, etc.) and updates tab list visibility.
| player | the player to vanish; must not be null |
Reveals the player to all other players. Removes vanish metadata and effects, shows player to all, and updates tab list.
| player | the player to unvanish; must not be null |
Returns whether the player is currently vanished.
Parameters:| player | the player to check; must not be null |
| boolean | true if the player is vanished |
Returns an unmodifiable set of all currently vanished player UUIDs.
Returns:| Set<UUID> | set of vanished player UUIDs; never null |
Toggles vanish state for the given player. Vanishes if currently visible, unvanishes if currently vanished.
| player | the player to toggle; must not be null |
Returns whether the player can see vanished players. Convenience method checking the essentialsc.vanish.see permission.
| player | the player to check; must not be null |
| boolean | true if the player has vanish see permission |
Reloads the vanish configuration from disk. Updates hide-from-tab, night-vision, mob-targeting, and collision settings from config.