ScoreBoardAPI is a PocketMine-MP 4.0.0 API that eases creating and managing scorehud
Only put the api in the src of your plugin and use it :)
ScoreBoardAPI::sendScore(Player, "anyname");
ScoreBoardAPI::setScoreLine(Player, $line, string);
You can get the text that is located in the line of the scoreboard of the player you entered the function
ScoreBoardAPI::getLineScore(Player, $line;
https://www.php.net/manual/fr/function.str-replace.php
ScoreBoardAPI::editLineScore(Player, $line, $replace, $subject);
ScoreBoardAPI::removeLine(Player, $line);
ScoreBoardAPI::hasScore(Player)
ScoreBoardAPI::removeScore($player);
have a nice day ;)