-
Notifications
You must be signed in to change notification settings - Fork 1
ScoreBoard Guides
Wenox edited this page Oct 24, 2025
·
1 revision
The ScoreBoardManager class manages player scoreboards in the SkyblockCore plugin. It provides static methods to create, update, and remove scoreboards for individual players using PocketMine-MP protocol packets.
- Create custom scoreboards with titles and display slots.
- Set individual scoreboard entries with scores and messages.
- Remove scoreboards from players.
- Store and retrieve a global scoreboard string.
- All operations are static and work with
Biswajit\Core\Playerinstances.
To use ScoreBoardManager from another plugin:
-
Add dependency in your
plugin.yml:depend: [SkyblockCore] -
Import the class:
use Biswajit\Core\Managers\ScoreBoardManager; use Biswajit\Core\Player;
-
Call static methods directly.
- Player instances must be of type
Biswajit\Core\Player. - Uses PocketMine-MP network packets for scoreboard management.
- Scoreboards are displayed in the sidebar by default, but can be customized.
- Each scoreboard entry requires a unique objective name.
-
setScoreboard(string $scoreboard): void- Sets the global scoreboard string. -
getScoreboard(): string- Returns the global scoreboard string. -
setScoreboardEntry(Player $player, int $score, string $msg, string $objName): void- Sets a scoreboard entry for a player. -
createScoreboard(Player $player, string $title, string $objName, string $slot = "sidebar", int $order = 0): void- Creates a new scoreboard for a player. -
removeScoreboard(Player $player, string $objName): void- Removes a scoreboard from a player.
// Set global scoreboard
ScoreBoardManager::setScoreboard("My Custom Scoreboard");
// Get global scoreboard
$board = ScoreBoardManager::getScoreboard();
// Create a scoreboard for a player
ScoreBoardManager::createScoreboard($player, "Player Stats", "stats");
// Add entries to the scoreboard
ScoreBoardManager::setScoreboardEntry($player, 1, "Money: $100", "stats");
ScoreBoardManager::setScoreboardEntry($player, 2, "Level: 5", "stats");
// Remove the scoreboard
ScoreBoardManager::removeScoreboard($player, "stats");- Package:
Biswajit\Core\Managers - Author: Biswajit
- Version: 1.0.0
For support with the SkyblockCore, you can join our Discord.
Copyright © 2025 PixelForge-Studios