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

Pinging an MCPE server from PocketMine

Comments in 'Plugin Development' started by Brutus, Oct 28, 2015.

  1. Brutus
    Offline

    Brutus New Member

    Joined:
    Aug 31, 2015
    Posts:
    21
    Does anyone happen to know of a good example of pinging an MCPE server for its status (playercount, whether it responds at all, etc.) from within the context of a PocketMine server? I have found multiple examples for websites, and I am looking specifically for something that works from a PocketMine server. Thanks a ton!
  2. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    There are already many threads about using a UT3 query to get server status.
    Brutus likes this.
  4. TheDiamondYT
    Offline

    TheDiamondYT New Member

    Joined:
    Dec 20, 2014
    Posts:
    44
    Minecraft User:
    TheDiamondYT7
    Try minecraft-api.com

    Visit it on a desktop.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I don't think using an API above something you can do directly is a good idea. That basically means that there is an unnecessary third-party tool that may be tracking your activity, and there is also more time required for query due to an extra HTTP layer.
    Brutus likes this.
  6. Brutus
    Offline

    Brutus New Member

    Joined:
    Aug 31, 2015
    Posts:
    21
    Thanks. By using "UT3 Query" as a search term I was finally able to find what I was looking for.

    Yeah, I was looking for a socket-level piece of code to efficiently check the status of other servers from a PocketMine server.
  7. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    I think this might be the one you're looking for: https://github.com/xPaw/PHP-Minecraft-Query
    Why not import a library? That wouldn't take as much time(your suggestion would require async).
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Actually, UT3 queries should use async too. A malicious server can suspend the connection for a long time, resulting in the server's lag.

Share This Page

Advertisement