[DEV] MinequeryPlus 0.3c - Minequery, plus more! [766]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, May 6, 2011.

  1. Offline

    codename_B

    MinequeryPlus 0.3
    It's minequery, plus more!
    As used on smp-minecraft-server.com


    MinequeryPlus creates a small server that listens for requests and responds with the port of Minecraft server, the current amount of players online, the max players cap, and the entire player list. It is based off the source code of Minequery entirely with a few changes to allow extra options configurable in the server.properties.

    Version 0.3 onwards requires Permissions for prefixes. If you don't have permissions the prefixes will be left blank.

    Configurable options - displayed as they would be in your server.properties
    Code:
    minequery-port=25566
    server-http=http://ubempire.com
    server-name=United Banana Empire
    
    This allows server lists to query extra things from your server - and allows you as the server owner to set PRECISELY what you want to be shown.

    This plugin is 100% compatible with minestatus and smp-minecraft-server.com and any other similar site.

    [​IMG]
    How things look to minestatus.net when using this plugin.

    Included is a modified version of the Minequery.class.php which takes account of the new data being sent from the server.

    Megaupload Link - including source v0.3c: Link
    Megaupload Link - including source v0.3b: Link
    Direct Link v0.3: Link
    Direct Link v0.2: Link
    Direct Link v0.1: Link

    Credits
    I modified Minequery for more functionality. (That I wanted for my server list.)
    Thanks to blakeman8192 and Kramer for creating the Bukkit version of Minequery and getting it started and polished up. Thanks to stoneLeaf on #bukkitdev for helping me to correctly implement permissions and debug my errors.

    Version History
    v0.3b - 09/05/2011: Included source. My bad.

    v0.3 - 07/05/2011: Breaking on no permissions present fixed. Added plugins list to the query.


    v0.2 - 07/05/2011: Permissions added. Gets prefix from permissions and displays online - 100% backwards compatible with minestatus.net

    v0.1 - 06/05/2011: First release. No known bugs. Rebranded as MinequeryPlus. Sends server-name and server website.
     
    jase240 likes this.
  2. Offline

    Plague

  3. Offline

    codename_B

  4. Offline

    anon

    Any way to integrate this with permissions, so you could show the player group on player list?
     
  5. Offline

    codename_B

    Sure, I'll add that for 0.2.
     
  6. Offline

    anon

    :D
     
  7. Offline

    codename_B

    Also coming in v0.2 - displaying of if the server is whitelisted - via minequery!

    v0.2 released. Permissions is required. I'm right in the middle of a fix that will remove the need for this.

    Issues involving the "[]" symbols commonly used in tags have been resolved plugin-side now.

    Fix will be online in 0.3.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  8. Offline

    MeinerHosen

    Very nice work.

    Adding this to my list of plugins to use :p
     
  9. seems the JSON query doesn't return anything other than latency, any chance on fixing that? would be nice
     
  10. Offline

    Carbon131

    Could you post an example of a way of detecting a server with all those features using PHP? I want to integrate my server status into my website and I know very little about PHP.
     
  11. Offline

    codename_B

    It's just the same as Minequery.
    Code:
    <?php
    require('minequery.class.php');
    $Query = (Minequery::query("mc.ubempire.com",25566));
    print_r($Query);
    ?>
    
    Have you got any more information? Is it the php side of the JSON query that isn't working? Are you using a custom JSON detection script? If you're using PHP would you be happy using the json encoding function of php on the standard array returned?

    I don't know which bit of things that the trouble lies in amongst without further info. It works for me and my site, but I don't use the JSON function of it.

    Thanks :D

    Why not update to the latest version so everyone can see what plugins you use?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  12. I used the usage.php that came with the original minequery plugin, all it did was print_r() the query_json result, there is only returned the latency.
    When using normal minequery it outputs everything just fine
     
  13. Offline

    codename_B

    Use the minequery.class.php I distribute with the plugin please, it needs to be updated to take into account the extra data being made available, otherwise of course it doesn't work.
    Code:
    <?php
    require('minequery.class.php');
    $Query = (Minequery::query("YOURIPHERE",25566));
    print_r($Query);
    ?>
    

    If you look at the sources for the two files you will notice that I've updated it. The standard file distributed with minequery just doesn't handle the extra data.

    Filtering out funny symbols in the prefix is coming in 0.4

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  14. Offline

    death-droid

    Downloads arent working for me :\ is there anyway you can upload this somewhere else
     
  15. Offline

    codename_B

    Yeah sure, sorry about that. My hosting provider is having some downtime.

    http://www.megaupload.com/?d=XNTN9VOC

    Also, I just realise you can check things are working by telnetting to port 25566 on your server and typing QUERY then pressing enter.

    AWESOME!

    :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  16. Offline

    Kramer

    Great to see user modifications to the Minequery plugin. :)

    Unfortunately, when you released your modification you did not release the source code with it. Since Minequery is released under the GPL v3, you are required to also release the source code. Not doing so brings you in violation of the license.
     
  17. Offline

    codename_B

    Oh my bad, attaching code now. Completely forgot - is it not included in the jar file? It's supposed to be.

    EDIT:
    Ok, so I'm still a noob at java compiling, I didn't compile it with "include source" checked.
    My humblest apologies to everyone, here's the correct version - with source included.
    v0.3: Link
     
  18. Offline

    fffizzz

    How about a way to query by world, so you can display a list like
    world1
    --player 1
    --player 2
    --player 3
    world2
    --player 4
    --player 5
    --player 6
    nether
    --player 7
    --player 9

    Or maybe a way to prefix it to the player name on our sites?
     
  19. Offline

    codename_B

    I'll look into it - but it's not a priority atm. I still have to get prefixes displaying as I want them to be. You're welome to take a look at my edited source and try it out though!
     
  20. Offline

    fffizzz

    im a hack with PHP, java confuses the hell out of me :D
     
  21. Offline

    codename_B

    I used to be like that, download Eclipse Java - it helps, lots.

    Just released the version that should fix funny symbols being displayed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  22. Offline

    codename_B

    Is your server using MQP? Let me know and I'll add it to my private beta list on http://smp-minecraft-server.com/beta/index.php

    This allows searching for servers with many different variables! Only three servers in the list atm - but feel free to try it out - and message me or tell me here and I'll add yours to it.

    ATM user registration/login/managing servers is under construction - but it will be complete soon!
     
  23. Offline

    Mighty Mackinac

    Didnt see it earlier, but where does the class file go? Also, Im really new to PHP, so I could use some help parsing the info.
     
  24. Offline

    codename_B

    The class file is only used it you have your own site. But it goes in the same directory as the php file you want to be able to query minequery.

    Do a bit more searching, there's tutorials and stuff.
     
  25. Offline

    Mighty Mackinac

    Got it working, thanks!
     
  26. Hi !
    I use version 740 of CB and it has error when players are on server :
    "
    01:24:29 [GRAVE] Exception in thread "Thread-228202"
    01:24:29 [GRAVE] java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
    01:24:29 [GRAVE] at com.smp.minequeryplus.Request.handleRequest(Request.java:91)
    01:24:29 [GRAVE] at com.smp.minequeryplus.Request.run(Request.java:60)
    01:24:29 [GRAVE] at java.lang.Thread.run(Unknown Source)
    "

    But the strange is that when no one is on the server, it run correctly !?!?

    Help me please THX !
     
  27. small request: add another property to the server.property that is carried over to the result returned from the query:

    country=DNK

    This is because some servers will lag for people who play from too far away. Maybe require the code to be of ISO 3166-1 alpha-3 format, so you have a standardized return that you can parse and search on.
    link to 3166-1 alpha-3 country code list: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
     
  28. Offline

    codename_B

    Have you got permissions? I haven't tested this without it, if you want something without permissions then just use the original minequery.

    There's something called the GeoIP database that allows people to search for an ip and see where it is located. All they have to do is "ping" the domain name from an html script and search to see what country it is in. This is the same thing minestatus does and I'm working on it for my server list. It would be more difficult to implement this client side, so I'm afraid no.
     
  29. Permission ? no, i don't use Permission.
    The MineQuery original has less option no ?
     
  30. Offline

    codename_B

    has less option no? no? yes, has less option.
     

Share This Page