PHPackages                             galaxygames/libscoreboard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. galaxygames/libscoreboard

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

galaxygames/libscoreboard
=========================

libscoreboard

1.0.7(2y ago)027GPL-3.0PHP

Since Aug 20Pushed 2y agoCompare

[ Source](https://github.com/GalaxyGamesMC/libscoreboard)[ Packagist](https://packagist.org/packages/galaxygames/libscoreboard)[ RSS](/packages/galaxygames-libscoreboard/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (7)Used By (0)

libscoreboard
=============

[](#libscoreboard)

libscoreboard

documents
=========

[](#documents)

1. General
----------

[](#1-general)

```
use galaxygames\scoreboard\Scoreboard;
...
class EgPlugin extends PluginBase{
  protected Scoreboard $scoreboard;

  public function onEnable() : void{
    $this->scoreboard = Scoreboard::getInstance();
  }
}
```

### 1.1 Create scoreboard

[](#11-create-scoreboard)

```
/**
 * @var Player $player
 * @var string $objectiveName
 * @var string $displayName
 */
$this->scoreboard->create($player, $objectiveName, $displayName)
```

### 1.2 Remove scoreboard

[](#12-remove-scoreboard)

```
$this->scoreboard->remove($player)
```

### 1.3 Change display name

[](#13-change-display-name)

```
/** @var string $newDisplayName */
$this->scoreboard->setDisplayName($player, $newDisplayName);
```

2. Lines
--------

[](#2-lines)

> **Important**These following instructions won't immediately show the changed line to player, they are required to send this code after the changes as the requirement to get it shown to player!

```
$this->scoreboard->update($player)
```

### 2.1 Set scoreboard line

[](#21-set-scoreboard-line)

```
/** @var int $line Line number, range from 0 to 15*/
/** @var string $context Context of the line*/
$this->scoreboard->setLine($player, $line, $context);
```

Example:

```
$this->scoreboard->setLine($player, 0, "line 1");
$this->scoreboard->setLine($player, 4, "line 4");
```

but the scoreboard won't have lines between 0 and 4... that is why floodLine existed!

```
/** @var int $start The start line which it will flood, default: 0*/
/** @var int $end The end line where the flood end, default: 15*/
/** @var string $flood The line in the range will be flooded by this value, default: ""*/
$this->scoreboard->floodLine($player, $start, $end, $flood);
```

Example:

```
$this->scoreboard->floodLine($player, 0, 3, "hello"); // Flood from line 0 to line 3 with "hello"
$this->scoreboard->floodLine($player, 4, 14); // Flood from line 4 to line 14 with empty line
```

### 2.2 Remove a line

[](#22-remove-a-line)

```
/** @var bool $brutal The removal will remove the line without putting an empty line if
this is true, default: fault */
$this->scoreboard->removeLine($player, $line, $brutal);
```

Example:

```
$this->scoreboard->removeLine($player, 1); //Remove line 1 and leave behind an empty line
$this->scoreboard->removeLine($player, 0); //Remove line 0 without leave behind an empty line
```

### 2.3 Fluent code style

[](#23-fluent-code-style)

```
$this->scoreboard->create($player, "board", "My board")
    ->setLine($player, 0, "line 0")
    ->floodLine($player, 1, 12)
    ->setLine($player, 13, "line 13")
    ->removeLine($player, 9)
    ->update($player);
```

### 2.4 Make Unique

[](#24-make-unique)

> **Important**(REMOVED!), All lines are made unique by default.

 RedundantBecause each lines must have a unique context, if you put a set of two lines with the same context it will fail... To solve this, use `Scoreboard::makeUnique`

```
$this->scoreboard->create($player, "board", "My board")
    ->setLine($player, 0, Scoreboard::makeUnique(0, "unique"))
    ->setLine($player, 1, Scoreboard::makeUnique(0, "unique"))
    ->setLine($player, 2, Scoreboard::makeUnique(0, ""))
    ->setLine($player, 3, Scoreboard::makeUnique(0, ""));
```

[![image](https://private-user-images.githubusercontent.com/54394881/259040467-95a63a13-0af1-4b84-8341-b7b287f0be5d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwNTgxMzQsIm5iZiI6MTc4MzA1NzgzNCwicGF0a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RXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlZmFkZWJiMGZkMTNhMmUxNjgxYzcwYTBhNmVhMjMxYmEwNzU4ZDQyZDE4MDM4YzM0MGQ5ZjM2NWJhMTU2YTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.JyYjGXFcwt9vIyued3v-4SijQFZL0ZnSqlrM_t4SA0w)-&gt; [![image](https://private-user-images.githubusercontent.com/54394881/259040071-e8f1df6e-c1f2-4761-bade-f765e3fdc841.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwNTgxMzQsIm5iZiI6MTc4MzA1NzgzNCwicGF0aCI6Ii81NDM5NDg4MS8yNTkwNDAwNzEtZThmMWRmNmUtYzFmMi00NzYxLWJhZGUtZjc2NWUzZmRjODQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAzVDA1NTAzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5NzA1NTFhZTAwNTZiMGZjM2M3M2RjZmZjN2JlM2YxNWEwMzlhYjM4OGZhY2M3YjdiZTJmZGNhZTE3YTRiYjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.yCVZbrgXrLGgnkLIqwSFS1_3E1D18m2wRWuc835HgT8)](https://private-user-images.githubusercontent.com/54394881/259040071-e8f1df6e-c1f2-4761-bade-f765e3fdc841.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwNTgxMzQsIm5iZiI6MTc4MzA1NzgzNCwicGF0aCI6Ii81NDM5NDg4MS8yNTkwNDAwNzEtZThmMWRmNmUtYzFmMi00NzYxLWJhZGUtZjc2NWUzZmRjODQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAzVDA1NTAzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5NzA1NTFhZTAwNTZiMGZjM2M3M2RjZmZjN2JlM2YxNWEwMzlhYjM4OGZhY2M3YjdiZTJmZGNhZTE3YTRiYjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.yCVZbrgXrLGgnkLIqwSFS1_3E1D18m2wRWuc835HgT8)

3. Other functions
------------------

[](#3-other-functions)

```
Scoreboard::getObjectiveName(Player $player); // Return the current color's name of a player
Scoreboard::clearPlayerCache(Player $player); // This should be called when player left the server
Scoreboard::clearCache(); // Clear all data
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

5

Last Release

1013d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54394881?v=4)[Arie1906](/maintainers/NTT1906)[@NTT1906](https://github.com/NTT1906)

---

Top Contributors

[![NTT1906](https://avatars.githubusercontent.com/u/54394881?v=4)](https://github.com/NTT1906 "NTT1906 (22 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (1 commits)")

### Embed Badge

![Health badge](/badges/galaxygames-libscoreboard/health.svg)

```
[![Health](https://phpackages.com/badges/galaxygames-libscoreboard/health.svg)](https://phpackages.com/packages/galaxygames-libscoreboard)
```

###  Alternatives

[afaya/edge-tts

Edge TTS is a PHP package that allows access to the online text-to-speech service used by Microsoft Edge without the need for Microsoft Edge, Windows, or an API key.

192.0k1](/packages/afaya-edge-tts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
