Player Visibility Toggle

BusyHub has two separate visibility mechanisms. They're easy to mix up because they touch the same underlying API, but they do genuinely different things.


The per-player item — a personal declutter switch, not vanish

yaml
player-visibility-item:
  enabled: true
  give-on-join: true
  slot: 8
  visible:
    material: LIME_DYE
    name: "&rPlayers: &aVisible"
  hidden:
    material: GRAY_DYE
    name: "&rPlayers: &cHidden"

Every player gets a dye item. Right-clicking it toggles their own view: switching to "Hidden" stops that player from seeing other players in the world. It does not make them invisible to anyone else — nobody else's client changes at all when you toggle this. It's a personal FPS/clutter reduction tool for a crowded lobby, not a moderation or anti-grief feature.

The item swaps material and name to reflect the current state, wherever it's moved to in the inventory. The preference is stored directly on the player's own data (not in any BusyHub file), so it survives rejoins automatically with no extra storage needed. A player joining late is kept consistent with everyone already online: if they'd previously set themselves to hidden, they won't see anyone already online; and any already-online player who has themselves set to hidden won't see the new arrival either.

enabled: false disables the right-click interaction; there's no permission gate otherwise — every player can use it regardless of rank.


The global admin switch — mutual hiding for everyone at once

yaml
visibility:
  players-hidden: false

Controlled by /busyhub visibility <hide|show|toggle>, this is a completely different mechanism: when on, it hides every player from every other player, mutually, all at once. There's no per-player choice involved — it's a blunt, server-wide instrument, useful for things like "give this lobby a solo-feeling appearance" rather than personal preference.


Why not to run both at once

Both mechanisms work by calling the same Bukkit hidePlayer/showPlayer API, which only tracks one boolean per viewer/target pair — it has no concept of "hidden because of the admin switch" vs. "hidden because of the personal item." If you turn the global switch on and a player then uses their personal item to set themselves back to "Visible," the two can end up fighting each other. In practice, pick one or the other for a given server rather than relying on both simultaneously.