server list skript

Discussion in 'Skript' started by AggerTV, Jan 25, 2020.

  1. I have here my server selector skript, but how would I show the online player list for each server in the menu?
    Code (Text):
    on click:
        if player is holding a nether star named "&3&lServer Selector":
            open chest with 5 row named "&3&l       Server Selector" to player
            wait 3 ticks
            loop numbers from 0 to 9:
                format slot loop-number of player with gray stained glass pane named "&7" to be unstealable
            loop numbers from 35 to 44:
                format slot loop-number of player with gray stained glass pane named "&7" to be unstealable
            format slot 17 of player with gray stained glass pane named "&7" to be unstealable
            format slot 18 of player with gray stained glass pane named "&7" to be unstealable
            format slot 26 of player with gray stained glass pane named "&7" to be unstealable
            format slot 27 of player with gray stained glass pane named "&7" to be unstealable
            format slot 20 of player with iron bars named "&7&lPrison" with lore "&8&l&m-------------", and "&aKlik her for at blive" and "&asendt til vores Prison server!" to close then run [send player to server "prison"]
            format slot 24 of player with diamond sword named "&d&lKitPvP" with lore "&8&l&m-------------", and "&aKlik her for at blive" and "&asendt til vores KitPvP server!"  to close then run [send player to server "kitpvp"]
            format slot 22 of player with gold pickaxe named "&4&lOP Prison" with lore "&8&l&m-------------", and "&7Under opbyggelse!" to close then run [send player to server "opprison"]
     
  2. is your question how to get player count variable or how to get that information into the lore?
     
  3. I recommend to use vanilla guis (set slot & on inventory click) instead of format slot, because format slot is slow and buggy.
     
  4. I wan't to know how to get the variable
     
  5. anyone please????
     
  6. you need a bungeecord-sided plugin to check that kind of stuff and send back to spigot-sided plugin, this is mostly not Skript anymore, but some of things you can do:
    - use Skript-Mirror to send a connection to the server and see their online count
    - use Skungee (it updated very recently, previously was very unstable, not sure about after the update)