Skip to main content

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.

PlayerSidebar extends Sidebar and is bound to exactly one player at a time. All base Sidebar methods also apply.

Player binding

MethodReturnsDescription
setPlayer(Player player)voidAssign this sidebar to a player
removePlayer()voidDetach the current player
getPlayer()Player (nullable)The currently bound player

Visibility

MethodReturnsDescription
show()voidShow the sidebar to the bound player
show(SidebarShowEvent.Reason reason)voidShow with a specific reason (fires event with that reason)
hide()voidHide the sidebar from the bound player

Example

PlayerSidebar sidebar = board.createPlayerSidebar("§6My HUD");
sidebar.setLine(0, "§7Hello, " + player.getName());
sidebar.setPlayer(player);
sidebar.show();

// Later, update and re-show
sidebar.setLine(0, "§7Score: §f" + score);
sidebar.show();

// Hide temporarily
sidebar.hide();