Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hypixel status with slapper

Comments in 'Plugin Development' started by Epicrafter60, Aug 29, 2016.

  1. Epicrafter60
    Offline

    Epicrafter60 New Member

    Joined:
    Jun 5, 2015
    Posts:
    19
    Minecraft User:
    Epicrafter60
    Guys, I'm really curious to know how to make the status thing that was in the Hypixel lobby with current player amount and info, so I'm asking. Firstly, I asked people on Twitter if hey know how to do it, and then they said slapper but then they didn't say the command and how to make the live player status. I already know how to make the lines and everything else but I don't know how to center the words and how to make the live player status with saying like "there are 6 player online" and then when 2 more people join it will say "there are 8 players online". If you know how to do this with slapper please tell me. And by the way, if you know how to do it with another plugin then still let me know but make the documentation clear.

    Thank you,
    Epicrafter60

    *picture below of what I mean for a clearer understanding of what I need

    image.png
  2. Ragnok1234
    Offline

    Ragnok1234 Active Member

    Joined:
    Jul 18, 2016
    Posts:
    53
    Minecraft User:
    Ragnok123
    PHP:
        public function spawnParticle(PlayerJoinEvent $e) {
         
    $p=$e->getPlayer()
            
    $br F::RESET"\n";
            
    $text[0] = F::BLUEF::BOLD"Server name example";
            
    $text[1] = F::DARK_GREEN"Welcome back, ".$p->getName();
            
    $text[2] = F::DARK_GREEN"Here is " .$this->getServer()->getOnlinePlayers(). " players online";
         
    $text[3] = F::DARK_GREEN"Some text";
         
    $text[4] = F::DARK_GREEN"Pikapikapikachu";
           
            
    $level $this->getServer()->getDefaultLevel();
           
            
    $title F::RESET$text[0]. F::RESET;
            
    $texter $text[1]. $br$text[2]. $br$text[3]. $br$text[4];
            
    $particle = new FloatingTextParticle(new Vector3(xyz), $texter$title);
            
    $level->addParticle($particle$p);
        }
    Somethink like this
  3. JonsMC
    Offline

    JonsMC Active Member

    Joined:
    Jul 26, 2016
    Posts:
    107
    Minecraft User:
    JonsMC
    Undefind F????
  4. Ragnok1234
    Offline

    Ragnok1234 Active Member

    Joined:
    Jul 18, 2016
    Posts:
    53
    Minecraft User:
    Ragnok123
    F is defined as TextFormat (use pocketmine\utils\TextFormat as F)
  5. JonsMC
    Offline

    JonsMC Active Member

    Joined:
    Jul 26, 2016
    Posts:
    107
    Minecraft User:
    JonsMC
    Then please tell him that, or he wont know :p
    btw remember to create private $text;
  6. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Or use LiveSigns, there is a fixed version. I have a file that shows all players below each other, i could modify it.
  7. Epicrafter60
    Offline

    Epicrafter60 New Member

    Joined:
    Jun 5, 2015
    Posts:
    19
    Minecraft User:
    Epicrafter60
    Can I have the livesigns
  8. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    private for what? Yes, he forgot to define $text. Create it.
    PHP:
    $text = [];
  9. Epicrafter60
    Offline

    Epicrafter60 New Member

    Joined:
    Jun 5, 2015
    Posts:
    19
    Minecraft User:
    Epicrafter60
    CraftYourBukkit do you have a plugin for the status?
  10. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    No, You've posted this in "Plugin Development", That means you want to make the plugin.
  11. Ragnok1234
    Offline

    Ragnok1234 Active Member

    Joined:
    Jul 18, 2016
    Posts:
    53
    Minecraft User:
    Ragnok123
    $text is defined as F::DARK_GREEN etc, it dont needed defined like public/private $text;
    I have somethink like that and it works:

    Attached Files:

  12. JonsMC
    Offline

    JonsMC Active Member

    Joined:
    Jul 26, 2016
    Posts:
    107
    Minecraft User:
    JonsMC
    What is x, y, z? Are they variable or just normal x y z?
    Also, you forgot to define use pocketmine\level\particle\FloatingTextParticle;
    Please add all nessersary Stuffs in your code :)
  13. Ragnok1234
    Offline

    Ragnok1234 Active Member

    Joined:
    Jul 18, 2016
    Posts:
    53
    Minecraft User:
    Ragnok123
    X y z i did not defined, so he must write his xyz postions.
    I inserted here only a copy of my code, not full. He must understade it. FloatingTextParticle, Level, Vector3, Player and TextFormat is needed to make floating text particle.
  14. Ragnok1234
    Offline

    Ragnok1234 Active Member

    Joined:
    Jul 18, 2016
    Posts:
    53
    Minecraft User:
    Ragnok123
    PHP:
     use pocketmine\Player;
    use 
    pocketmine\utils\TextFormat as F;
    use 
    pocketmine\level\Level;
    use 
    pocketmine\math\Vector3;
    use 
    pocketmine\level\particles\FloatingTextParticle;
  15. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    PHP:
           $level->addParticle(new FloatingTextParticle(new Vector3(-140, -9),"",.$this->getServer()->getOnlinePlayers()));
    Code:
    Notice: Array to string conversion
    I do not understand
  16. JonsMC
    Offline

    JonsMC Active Member

    Joined:
    Jul 26, 2016
    Posts:
    107
    Minecraft User:
    JonsMC
    She is wrong, it should be count($this->getServer()->getOnlinePlayers()); :)
    Praxthisnovcht likes this.
  17. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    idiot that I am lol
  18. JonsMC
    Offline

    JonsMC Active Member

    Joined:
    Jul 26, 2016
    Posts:
    107
    Minecraft User:
    JonsMC
    :rolleyes: Notice next time tho :)
  19. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    using a floating text particle with a update task that runs every few sec
  20. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    How this is related to Slapper plugin?

Share This Page

Advertisement