SharedSidebar extends Sidebar and can be shown to any number of players simultaneously. It is identified by a string ID. All base Sidebar methods also apply.
Identity
| Method | Returns | Description |
|---|---|---|
getId() | String | The unique identifier for this sidebar |
Player registration
| Method | Returns | Description |
|---|---|---|
getPlayers() | Collection<UUID> | All registered player UUIDs |
addPlayer(Player) | void | Register a player |
removePlayer(Player) | void | Unregister a player |
Visibility control
| Method | Returns | Description |
|---|---|---|
show() | void | Show to all registered players |
showTo(UUID playerUUID) | void | Show to a specific player |
showTo(UUID, SidebarShowEvent.Reason) | void | Show to player with explicit reason |
hide() | void | Hide from all players |
hideFrom(UUID playerUUID) | void | Hide from a specific player |
getViewers() | Collection<UUID> | Players currently viewing the sidebar |
isViewedBy(UUID) | boolean | Whether a player is currently viewing |
isBeingViewedByAll() | boolean | Whether all registered players are viewing |
getPlayers() returns all registered players; getViewers() returns only those actively seeing the sidebar.