All Projects → MisteFr → ScoreboardsPE

MisteFr / ScoreboardsPE

Licence: GPL-3.0 License
A PocketMine-MP plugin that let you easily send scoreboards by using commands on your server who comes with a rich API for developers.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to ScoreboardsPE

SkyBlock
🦅 SkyBlock for PocketMine-MP
Stars: ✭ 102 (+161.54%)
Mutual labels:  pocketmine-plugin, pocketmine-mp-plugin
BuilderTools
🪓 Powerful World Editor plugin for PocketMine servers
Stars: ✭ 74 (+89.74%)
Mutual labels:  pocketmine-plugin, pocketmine-mp-plugin
PerWorldInventory
A full-featured per world inventory plugin for PocketMine-MP.
Stars: ✭ 14 (-64.1%)
Mutual labels:  pocketmine-plugin
AdvancedKits
A PocketMine-MP plugin that adds kits to your server with many features and support for UIs and custom enchantments
Stars: ✭ 43 (+10.26%)
Mutual labels:  pocketmine-mp-plugin
PocketMine-Plugins
A bunch of PocketMine plugins that aren't useful enough for their own repo
Stars: ✭ 13 (-66.67%)
Mutual labels:  pocketmine-plugin
Battles
Extremely extendable and customisable duels plugin designed for PocketMine-MP servers. 🚀 ⚔️
Stars: ✭ 13 (-66.67%)
Mutual labels:  pocketmine-plugin
SimpleMapRenderer
A PocketMine-MP Plugin that implements FilledMap
Stars: ✭ 25 (-35.9%)
Mutual labels:  pocketmine-plugin
InfoAPI
Placeholder registry and formatting API.
Stars: ✭ 27 (-30.77%)
Mutual labels:  pocketmine-plugin
ExamplePlugin
Example PocketMine-MP plugin, showing some basic features of the API
Stars: ✭ 26 (-33.33%)
Mutual labels:  pocketmine-plugin
PocketAI
Addon compatible AI plugin for PocketMine-MP
Stars: ✭ 25 (-35.9%)
Mutual labels:  pocketmine-plugin
ProperDuels
A properly made duels plugin
Stars: ✭ 16 (-58.97%)
Mutual labels:  pocketmine-plugin
Offhand
A PocketMine-MP Plugin that implements OffHand (and OffHandInventory)
Stars: ✭ 36 (-7.69%)
Mutual labels:  pocketmine-mp-plugin
PocketMine-MP-Plugins
Repository full of goodies (all my awesome PocketMine-MP Plugins)
Stars: ✭ 33 (-15.38%)
Mutual labels:  pocketmine-plugin
Emotes
This plugin allows players to use their favorite emotes on the server!
Stars: ✭ 15 (-61.54%)
Mutual labels:  pocketmine-plugin
Lunar
Anticheat for PocketMine-MP API-3.0.0.
Stars: ✭ 15 (-61.54%)
Mutual labels:  pocketmine-mp-plugin
BlocksConverter
A PocketMine-MP plugin allows you to convert Minecraft PC maps to MCPE/Bedrock maps or vice-versa.
Stars: ✭ 47 (+20.51%)
Mutual labels:  pocketmine-mp-plugin
DiscordBot
DiscordBot, A brand new plugin for pocketmine-mp.
Stars: ✭ 41 (+5.13%)
Mutual labels:  pocketmine-mp-plugin
DevTools
Development tools plugin for PocketMine-MP
Stars: ✭ 79 (+102.56%)
Mutual labels:  pocketmine-plugin
AntiInstaBreak
PocketMine-MP plugin implementing instabreak anti-cheat which was originally built-in.
Stars: ✭ 16 (-58.97%)
Mutual labels:  pocketmine-plugin
MysteryBox
Crate implemention for PocketMine-MP (PMMP)
Stars: ✭ 19 (-51.28%)
Mutual labels:  pocketmine-mp-plugin

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].