By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.

OK, Don't show this again

A PocketMine-MP plugin that let you send scoreboards by using commands on your server who comes with a rich API for developers.
version 2.0.2
Approved
Direct Download How to install?
Switch version
26386 Downloads / 75288 Total
12 Reviews
Plugin Description §

ScoreboardPE


A PocketMine-MP plugin that let you easily send scoreboards by using commands on your server who comes with a rich API for developers for MCBE 1.7, 1.8 & 1.9.

API

use Miste\scoreboardspe\API\{
	Scoreboard, ScoreboardDisplaySlot, ScoreboardSort, ScoreboardAction
};

/*
    Create a scoreboard with the display name Miste
    The id is created and saved linked with the display name internally
    You can choose if you want your lines to be padded or not (by default there will be padded).
*/    

$scoreboard = new Scoreboard($this->getServer()->getPluginManager()->getPlugin("ScoreboardsPE")->getPlugin(), "Miste", ScoreboardAction::CREATE);
$scoreboard->create(ScoreboardDisplaySlot::SIDEBAR, ScoreboardSort::DESCENDING, true); //true for padding, false for no padding

/*
    If you want to get back the Scoreboard instance of one of your scoreboard do as you were creating on and add the ScoreboardAction::MODIFY at the end of the constructor.
    Here you will get back the instance of the scoreboard we created above
*/

$scoreboard = new Scoreboard($this->getServer()->getPluginManager()->getPlugin("ScoreboardsPE")->getPlugin(), "Miste", ScoreboardAction::MODIFY);

/*
    Send the scoreboard to the player (without any lines)
*/

$scoreboard->addDisplay($player);

/*
    Add lines to the scoreboard O
    If you send line 1 then line 4 the plugin will automatically send two empty lines between.
    The max number of lines is 15, send more than 15 can bring issues when removing some.
    The lines are automatically sent to all the viewers of the scoreboard.
*/

$scoreboard->setLine(1, "line1");
$scoreboard->setLine(2, "line2");
$scoreboard->setLine(5, "line5");
$scoreboard->setLine(8, "line8");
$scoreboard->setLine(9, "line9");

/*
    Remove the line you choose from the scoreboard. This line will be removed from all the viewers.
*/

$scoreboard->removeLine(2);

/*
    Remove all the lines from the scoreboard. The lines will be removed from all the viewers.
*/

$scoreboard->removeLines();

/*
    Rename the scoreboard called Miste to Miste1 and re send it to all the viewers
*/
    
$scoreboard->rename("Miste", "Miste1");

/*
    Remove the scoreboard from the display of the player
*/

$scoreboard->removeDisplay($player);

/*
    Delete the scoreboard from the database (in order to save RAM)
*/

$scoreboard->delete();

/*
    Return an array with all the players that can view the scoreboards
    **NB** Players are automatically removed from this array if the player quits the server or if you remove the scoreboard for this player
*/

$scoreboard->getViewers();


Commands

The command to use the soreboards is scoreboard, its aliases are sc and score.

  • /scoreboard create < Name of the scoreboard > < displaySlot (sidebar/list/belowname) > < sortOrder (0->ascending/1->descending) >

    • DisplaySlot
      It's where the scoreboard is displayed on your screen
      • sidebar: the default scoreboard position (at the right of your screen).
      • list: above the player list.
      • belowname: below the name of the player (not implemented in 1.7.0.2 beta).
    • Sort Order
      This is the order in which your entries are classified.
      • 0: The score is from the smallest to the biggest
      • 1: The score is from the biggest to the smallest

It creates the scoreboard and save it.

  • /scoreboard add < player / @all > < title >

It sends the scoreboard display.
For example: /scoreboard add @all Miste display that:

  • /scoreboard setLine < player / @all > < Name of the scoreboard > < line > < message >

It adds the line you want with the text you want to the scoreboard.
The player to which you are sending this setLine have to have received the scoreboard first.
NB: You can't add two lines with the same message. If you don't have any lines to your scoreboard and you add the line 4 it will add 3 empty lines too.
For example: /scoreboard setLine Misteboss1 Miste 1 My name is Miste display that:

  • /scoreboard rmLine < Name of the scoreboard > < line >

It removes the line you want of the scoreboard.
For example: /scoreboard rmLine Miste 1 display that:

  • /scoreboard clearLines < Name of the scoreboard >

It removes all the lines from your scoreboard and resend it to all the viewers.

  • /scoreboard rename < old name > < new name >

It renames your scoreboard and re send it to all the viewers.

  • /scoreboard remove < player / @all > < Name of the scoreboard >

It removes the scoreboard from the player.
For example: /scoreboard remove @all Miste will remove the scoreboard from all the online players.

  • /scoreboard delete < Name of the scoreboard >

It removes the scoreboard from the database, that means that you wouldn't be able to use it in the future.
NB: Please note that this command doesn't remove the scoreboard from it's viewers
Example: /scoreboard delete Miste will remove the scoreboard.

  • /scoreboard help

It gives you the list of available commands and how to use them.

What's new §
  • Fix a potential issue.
  • Merge pull request #27 from IceCruelStuff/patch
    • Update Scoreboard.php
  • Update Scoreboard.php, closes #26
  • Bump to 2.0 as the last commit was breaking the previous API.
  • Fix #14. setLine doesn't need the $player argument anymore, changes are now automatically sent to all the viewers.
  • C2a poggit + be sure that the plugin is the first loaded in case you want to create some scoreboards in onEnable().
  • Add an icon and poggit's badges.
  • You can now choose if you want your lines to be padded or not (by default with commands & optional with the API) #13.
  • Fix #6. You can now choose if you want to register commands or not. Added /sc clearLine to clear all the lines of the scoreboard.
  • You can now remove all the lines from the scoreboard by using removeLines() (#9). Removing a line or all the lines will now affect all the viewers of the scoreboard. Adding a message when you are creating a scoreboard that already exists because it could lead to a misunderstanding.

Firebros1
Outdated
using v2.0.1
31 Jan 22
Crashes whenever I try and add a line to my scoreboard, was able to only add a title. Really disappointed as I thought I would finally be able to add scoreboards.
Endermanbugzjfc
Outdated
using v2.0.1
14 Feb 21
MoriRo
Outdated
using v2.0.1
14 Feb 21
Server always crashes
Dvaelin121
Outdated
using v2.0.1
29 Jan 21
Does this scoreboard support economyAPI, pure perms, Etc?
IceCruelStuff
Outdated
using v2.0.1
02 Jul 20
miejulian
Outdated
using v2.0.1
12 Jun 20
the server is permanently shutting down thanks.
strich3
Outdated
using v2.0.1
05 Mar 20
This plugin is Great šŸ‘
YoungFad
Outdated
using v2.0.1
11 Feb 20
captainleviftw
Outdated
using v2.0.0
31 Dec 18
Only show the title, lines not showing.
MisteFr
01 Mar 19
Please re read the README & report errors to my github if you have some.
goodmario1
Outdated
using v1.0.4
02 Dec 18
Great plugin! Works as intended! (BTW Iā€™m so glad they finally added scoreboards to MCBE!)
TWRRR
Outdated
using v1.0.1
06 Aug 20
Tip For Developers: Use The First Version As The Most Recent Will Crash The Server
Wolfkid200444
Outdated
using v1.0.1
19 Oct 18
Awsome Man thanks!

Reply to review by :

/ 5
Supported API versions
3.0.0
->
3.25.6
License §
Categories:
API plugins
Admin Tools
Informational
Permissions
Commands

You can leave one review per plugin release, and delete or update your review at any time

/ 5
Loading...