Documentation Index
Fetch the complete documentation index at: https://velas.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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.
Example
SharedSidebar shared = board.createSharedSidebar("lobby", "§a§lLobby");
shared.setLine(0, "§7Players: §f" + Bukkit.getOnlinePlayers().size());
for (Player p : Bukkit.getOnlinePlayers()) {
board.addPlayer(p);
shared.addPlayer(p);
}
shared.show();
// Later: hide from one player
shared.hideFrom(targetPlayer.getUniqueId());
// Check viewers
if (shared.isViewedBy(player.getUniqueId())) {
// player can see the sidebar
}