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

Link Slots

Discussion in 'Requests' started by AndreySK, Sep 2, 2017.

  1. AndreySK

    AndreySK Creeper

    Messages:
    5
    GitHub:
    AndreySK4
    Can you give me a plugin to query all servers players in one server?
     
  2. Thouv

    Thouv Slime

    Messages:
    84
    GitHub:
    adeynes
    So you want to get a server's player count?
    You can use MCAPI, which can be used to get lots of info from a server (query must be enabled), but in your case you just want the player count:
    PHP:
    $ip // the ip of the server
    $port // the port of the server
    $query_result json_decode(file_get_contents("https://use.gameapis.net/mcpe/query/players/$ip:$port"), true);
    $online_players $query_result["players"]["online"]; // online players
    $max_players $query_result["players"]["max"]; // max players
     
  3. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    This is the request section, not the development section. The poster really doesn't need a code snippet.

    @AndreySK please elaborate more, what exactly do you want? Have you already searched for something that fits your needs?
     
    Thunder33345 likes this.
  4. AndreySK

    AndreySK Creeper

    Messages:
    5
    GitHub:
    AndreySK4
    I want a plugin who query all servers slots in one server.Like linkslots,network query etc.LinkSlots is not working now,networkquery is saying 3947625/1 players =)))))
     
  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.