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

Multiple query

Comments in 'Plugin Development' started by Pyszko, Aug 17, 2015.

  1. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    Hi guys,
    I have one question.
    How to can make multiple query on my server? (Lobby)
    Now i have 2 servers: survival and factions + lobby
    Can make players and max players on server list?
    Example:

    Survival: 12/20
    Factions: 15/20
    Lobby: 2/10

    After multi query:
    Lobby: 29/50

    I find libcommon and xPaw, but i can not use this.
    Who can help and tell me how to make this step by step.
    Best regards ;)

    PS: lbsg have this.

    Screenshot_2015-08-17-14-49-20.png
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Please first explain how you are planning to fetch the number of players from the other servers.
    Next, use QueryRegenerateEvent, or $server->getQueryInformation->setPlayerCount().
    Pyszko likes this.
  3. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    I do not understand how to do it.
    I know nothing about programming, (i hope you will change)
    You can explain it to me step by step?
    Not spoken with want to let have everything ready.
    Sorry for my english but i use google translator :D
  4. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    I think that only changes the results of queries, but not necessarily the results from MOTD requests.
    Pyszko likes this.
  5. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    Can someone explain to me how to do it? :D
  6. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Pyszko likes this.
  8. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    I modyfi query gen at line 31, but not work :/
    Screen: Screenshot_2015-08-17-23-03-43.png I make ZIP (phar to ZIP)
    I go to libcommon --> resources --> exaples --> querygen.php
    Next modyfi line 31 (screen)
    And create phar, past to "plugins"

    What am i doing wrong?

    Attached Files:

  9. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    If you know nothing about programming, then why bother? This task is simply too hard for someone like you. I'll even admit that I can't do it. But why post this here? Is this a tutorial or a development snippet? I don't think so.
    Pyszko likes this.
  10. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    I wrote it because want to let to know how to do it.
    Maybe there's a person who knows about this and help me.
  11. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    But I believe this is the wrong section to post. Did you want to make a plugin?
    Pyszko likes this.
  12. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    I hope I will learn to write plugins. Maybe this is a bad section. Why are you asking me if I wanted to learn to write plugins? :D
  13. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    So do you want to query other servers with a plugin?
    Pyszko likes this.
  14. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    "libcommon" apparently this can be done :)
    Look #6 and #8 post.
  15. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Copy the modified "querygen.php" to your plugins directory. No need to modify the phar.
    Pyszko likes this.
  16. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    I have error :(
    Screenshot_2015-08-18-13-12-12.png
  17. Pyszko
    Offline

    Pyszko New Member

    Joined:
    Aug 16, 2015
    Posts:
    10
    Minecraft User:
    Pyszko
    Ok, now work ^^ thx all for help :p

    //close
  18. basprohop
    Offline

    basprohop Active Member Plugin Developer

    Joined:
    Aug 8, 2015
    Posts:
    128
    Plugins:
    3
    Minecraft User:
    basprohop
    For anyone in the future that might be interested I quickly whipped this up: https://github.com/basprohop/CombinedSlots
    It works and is configurable, also please use the search function before posting threads

Share This Page

Advertisement