Astral Realms Documentation Help

Vanish

Vanish state is a simple in-memory Map<UUID, String> on VanishServiceImpl (playerId → name), but it drives three independent layers of hiding: Bukkit's built-in show/hide-player API, a packet filter, and a large block of cancelled gameplay events. All three read the same isVanished(UUID) check.

Visibility

hidePlayer(Player) calls Player#hidePlayer(plugin, target) for every online player except those with staff.vanish.see and the vanished player themself. showPlayer(Player) reverses this. Both also toggle Player#setSleepingIgnored so a vanished player doesn't block/unblock everyone else's sleep, and hidePlayer clears the vanished player as a target from every nearby Creature so mobs already chasing them immediately give up.

On join (VanishListener#onJoin, LOWEST priority):

  • If the joining player has staff.vanish (i.e. is staff), they are preemptively hidden and their join message is suppressed — this covers the window before AstralSync's apply() callback (which restores the correct persisted vanish state) has run.

  • If the joining player lacks staff.vanish.see, every currently-vanished player is hidden from them individually (player.hidePlayer(...)), since the vanished players' own hidePlayer call happened before this player existed to be hidden from.

On quit (VanishListener#onQuit, LOWEST priority): a vanished player's quit message is suppressed and their entry is removed from the in-memory vanished map (invalidate).

Packet filtering

VanishPacketListener (a PacketEvents SimplePacketListenerAbstract) strips vanished players out of two outbound packet types for any viewer lacking staff.vanish.see:

Packet

Effect

TAB_COMPLETE

Removes any command-match suggestion whose text is a vanished player's name (e.g. /msg <tab> won't suggest them).

PLAYER_INFO_UPDATE

Removes vanished players' entries from the player-info packet (tab list). If every entry in the packet was a vanished player, the packet is cancelled outright rather than sent empty.

Both cases mark the packet for re-encoding after mutation so the trimmed version is actually sent.

Blocked gameplay events

While a player isVanished, VanishListener cancels the following. The container/block/pressure-plate/ damage/target/pickup/entity-interact/mount/bucket handlers run at HIGH priority; the rest run at the default (NORMAL) priority:

Event

Behavior

PlayerInteractEvent (right-click block)

Container interaction is cancelled and denied; for Lidded containers (chests, barrels, …) a detached read-only copy of the container's contents is opened instead, so vanished staff can still peek inside without visibly opening the lid or exposing themselves to InventoryOpenEvent-driven anti-cheat/plugin hooks.

BlockBreakEvent

Cancelled.

BlockPlaceEvent

Cancelled.

PlayerInteractEvent (physical, pressure plate)

Cancelled and denied.

EntityDamageByEntityEvent

Cancelled if the damager is the vanished player, directly or via a projectile they shot.

EntityDamageEvent

Cancelled if the vanished player is the one taking damage.

EntityTargetEvent

Cancelled if a mob targets the vanished player.

PlayerPickItemEvent

Cancelled (item-swap pick, not physical item pickup).

PlayerInteractEvent (physical, farmland/soil)

Cancelled — no crop trampling.

PlayerInteractEvent (physical, big dripleaf)

Cancelled — no leaf tilt.

SkeletonHorseTrapEvent

Cancelled if every eligible human present is vanished (a mixed group of vanished + visible players still triggers it for the visible ones).

PlayerNaturallySpawnCreaturesEvent

Cancelled if the triggering player is vanished.

PreSpawnerSpawnEvent

Cancelled if every player within 16 blocks (256 squared) of the spawner is vanished.

RaidTriggerEvent

Cancelled if the triggering player is vanished.

BlockReceiveGameEvent (sculk sensor trigger)

Cancelled if the triggering entity is a vanished player.

PlayerInteractEvent (physical, sculk sensor / calibrated sculk sensor / sculk shrieker)

Cancelled.

PlayerInteractEvent (physical, turtle egg)

Cancelled — no egg-crush chance.

FoodLevelChangeEvent

Cancelled if it would lower a vanished player's food level (hunger loss only — food gain from eating is unaffected).

PlayerInteractEntityEvent

Cancelled — vanished players can't right-click-interact with entities.

EntityMountEvent

Cancelled if the mounting entity is the vanished player.

PlayerBucketEmptyEvent

Cancelled.

PlayerBucketFillEvent

Cancelled.

None of these are documented as reversible per-event toggles — they are unconditional while vanished. There is no configuration for this list; changing it requires editing VanishListener in source.

See also

Last modified: 25 July 2026