1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How to use Scoreboard API plugin

Discussion in 'Plugin Help' started by BlueWhaleYT, Aug 21, 2019.

  1. BlueWhaleYT

    BlueWhaleYT Spider Jockey

    Messages:
    42
    GitHub:
    bluewhaleyt
    Hi there,
    I am a beginner of Pocketmine MP.
    Can someone solve me how can I use Scoreboard API plugin from PMMP?
    Once I installed and put into the fire,joined to the server.
    That's didn't show me the scoreboard in the right of side.
    thanks.
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    I'm fairly certain that ScoreboardAPI is just an API for other plugins to do stuff with it, isn't it?
     
    EdwardHamHam and Fadhel like this.
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    That's exactly all it is. It's meant for developers, not users.
     
  4. BlueWhaleYT

    BlueWhaleYT Spider Jockey

    Messages:
    42
    GitHub:
    bluewhaleyt
    What about Scorehud plugin?
    I downloaded addon ( PurePerms ) and it doesn't showing the rank {rank}.
    Even I type {name} it not showing player name.
     
  5. ShushImSam

    ShushImSam Spider Jockey

    Messages:
    37
    HimbeersaftLP likes this.
  6. Taco

    Taco Spider Jockey

    Messages:
    41
    GitHub:
    taconoburrito
    its sad how long it took me to figure out i had to import addons .-.
     
  7. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    im wondering why you didnt get warn for post in old threads!!! i remember i just anwsered 1 thread in 2018 and i get warn by @jasonwynn10 so you posted 3 times in old threads you should ban right now
     
  8. euto3rr

    euto3rr Creeper

    Messages:
    2
    use Scoreboards\Scoreboards;

    $sc = Scoreboards::getInstance();
    $sc->new($player, "Name", "First Line (like server name)");
    $sc->setLine($player, 1, "Your line here");

    //For remove
    if($sc->getObjectiveName($player) !== null){
    $sc->remove($player);
    }

    If u wanna make it with array

    $this->config->set("Scoreboard", array());
    //Save
    //Foreach...
    In task: $this->main->addScore($online);
    In main:
    public function addScore(Player $player){
    $line = 1;
    foreach($this->config->get("Scoreboard") as $array){
    Scoreboards::getInstance()->setLine($player, $line, $this->setLines($player, $array));
    $line++;
    }
    }
    public function setLines(Player $player, string $string):string{
    $string = str_replace(["{name}", "{ping}"], [$player->getName(), $player->getPing()], $string);
    return $string;
    }
     
  9. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    im wonderin again do you have eyes?
    i said:
    and you posted again!!
     
  10. Taco

    Taco Spider Jockey

    Messages:
    41
    GitHub:
    taconoburrito
    You bein kindof a snitch rn ngl
     
  11. euto3rr

    euto3rr Creeper

    Messages:
    2
    I didn't post it to you
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.