Overview | EssentialsC | VanishApi
net.godlycow.org.essc.api

Interface VanishApi

public interface VanishApi

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.
Method Detail
public void vanish(Player player)

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.

Warning: Must be called on the main thread.
Parameters:
playerthe player to vanish; must not be null
public void unvanish(Player player)

Reveals the player to all other players. Removes vanish metadata and effects, shows player to all, and updates tab list.

Warning: Must be called on the main thread.
Parameters:
playerthe player to unvanish; must not be null
public boolean isVanished(Player player)

Returns whether the player is currently vanished.

Parameters:
playerthe player to check; must not be null
Returns:
booleantrue if the player is vanished
public Set<UUID> getVanishedPlayers()

Returns an unmodifiable set of all currently vanished player UUIDs.

Returns:
Set<UUID>set of vanished player UUIDs; never null
public void toggle(Player player)

Toggles vanish state for the given player. Vanishes if currently visible, unvanishes if currently vanished.

Warning: Must be called on the main thread.
Parameters:
playerthe player to toggle; must not be null
public boolean canSeeVanished(Player player)

Returns whether the player can see vanished players. Convenience method checking the essentialsc.vanish.see permission.

Parameters:
playerthe player to check; must not be null
Returns:
booleantrue if the player has vanish see permission
public void reload()

Reloads the vanish configuration from disk. Updates hide-from-tab, night-vision, mob-targeting, and collision settings from config.

Warning: Must be called on the main thread.