ServerStatus

Online

ServerStatus

Current version

  • Actual version is v1.6 intended for newest Craftbukkit versions.

Basic information

  • This plugin sends data to custom .PHP file on your website using GET headers. The data is information about current server status, e.g. Online/Offline, number of online players etc.

Installation

Configuration file

useSecurityKey: false
securityKey: '12345'
callUrl: 'http://www.example.com/path/to/file/getServerStatus.php'
connection-timeout: -1
ignore-list: 'player1,player2,player3'
refresh-rate: -1
  • On the first start of server with this plugin the plugin creates folder ServerStatus and the configuration file. Then you have set data in config and restart the server.
  • In configuration file config.yml you can set useSecurityKey (true or false), your security key and full path (adress) to the .PHP file.
  • Security key can be any expession you want, you will need to set it only in this config.yml file and then in .PHP file. Key will be sent by plugin in GET header, and the .PHP file will check if it is equal.
  • Then you can set connection timeout. It means how long time give you to plugin to connect to .PHP file. (in milliseconds)
    (set -1 for default timeout)
  • And there is a ignore list. Players in ignore list will be ignored from counting and listing players (plugin won't send them to .PHP file).
  • Finally you can set refresh-rate to some number of seconds. It means that the plugin will send newest information every x seconds.
    (set -1 for disabling periodic call)

.PHP file

  • File code and download link: click here.
  • In this .PHP file is only easy script to read data from GET headers and to write it into .TXT file. You have to set the security key and if you are good .PHP programmer, you would be able to rewrite the code to whatever you want (e.g. write data to .HTML files, to MySQL database,...).
  • You can choose, if you want to have banner.png or some TXT file with server status. Banner will look like this: http://dev.bukkit.org/media/images/46/129/banner.png
List of GET headers
  1. sec - The security key
  2. status - Status of the server, can be Online or Offline
  3. name - Name of the server, loaded from server-properties file
  4. motd - Server's message of the day from server-properties file
  5. ip - IP adress of the server, loaded from server-properties file
  6. port - Port of server behind the IP adress, loaded from server-properties file
  7. plsnum - Number of online players
  8. maxnum - Maximum number of players, loaded from server-properties file
  9. players - List of online players
  10. log - Reason why was the URL called (It can be "Starting up Minecraft server", "Stopping Minecraft server", "Player (name) has joined the game", "Player (name) has left the game")
  11. plversion - Contains version number of this plugin
  12. bkversion - Contains version number of used Bukkit version

server.properties

  • Don't forget to set correct information (server-ip, server-port, server-name, max-players) in server's file server.properties!

Commands & Permissions

  • serverstatus.reload - Allows you to use /serverstatus command, which reloads the config
  • serverstatus.ignore - Player with this permission will be ignored from counting and listing players

Changelog

v1.6

  • Added option to set refresh-rate to -1 for disabling periodic call or set it to any time in seconds
  • Added option to set connection-timeout to -1 for default timeout or set it to any time in milliseconds
  • (and no kidding, now is the java.lang.NullPointerException error really fixed! :))

v1.5.3

  • Really fixed java.lang.NullPointerException error ;)

v1.5.2

  • Fixed java.lang.NullPointerException error

v1.5.1

  • Fixed StringIndexOutOfBoundsException - was thrown when noone was on the server and it tried to substring empty string
  • Fixed sending of "Offline" and "Online" status
  • Added co-op with MCStats.org

v1.5

  • Update for newest CB
  • Completely rewrited code
  • Added refresh rate
  • Added new GETs for bukkit version and for plugin version

v1.4

  • Added ignore list (players on this list will be ignored from counting and listing)
  • Added ignore permission
  • Added configurable connection timeout (in seconds)

v1.3

  • Fixed problem with communication of plugin and PHP file.
  • Fixed problem with permissions.

v1.2

  • Added: Obtaining MOTD from server.properties.
  • Added: Command for reload config.
  • Fixed bug with obtaining player names.

v1.1

  • Added: If you don't specify server's IP address in server.properties, plugin will get the IP address of local machine.
  • Update for CB 1.3.1-R2.0

v1.0

  • First version of ServerStatus.

To do

  • Set connection timeout in seconds
  • Setting players to be ignored from counting and listing.
  • Option that you can choose to create image banner by .PHP code
  • Obtaining the MOTD from server.properties file
  • Command to reload config
  • Getting IP adress from local machine, not from server.properties.

Do you like my plugins?

Donate

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of crasherman43 crasherman43 Sep 06, 2014 at 15:09 UTC - 0 likes

    Can this plugin be used to post server status on a facebook page?

  • Avatar of alexgaming12 alexgaming12 Jul 16, 2014 at 07:29 UTC - 0 likes

    lortet virker jo ikke

  • Avatar of to175 to175 Feb 10, 2014 at 19:46 UTC - 0 likes

    working ?

  • Avatar of wazoomie wazoomie Jan 10, 2014 at 13:39 UTC - 0 likes

    @PerwinCZ: Go

    That's great news! Could you also add some functionality? Like custom commands with custom POST requests? For instance in the config:

    /rankupdate username rankname
    - http://domain.cz/updaterank.php?username=%arg0%&newrank=%arg1%
    

    and in chat:

    /rankupdate perwincz admin
    
  • Avatar of PerwinCZ PerwinCZ Jan 08, 2014 at 19:51 UTC - 1 like

    I am going to make a big update :)

    www.perwin.cz

  • Avatar of malteee malteee Dec 23, 2013 at 12:25 UTC - 0 likes

    @jamesmonahan: Go

    Same problem here: server console say 404 error, but the config files are correct

  • Avatar of jamesmonahan jamesmonahan Dec 17, 2013 at 11:53 UTC - 0 likes

    hi,

    i have not found any replies in previous comments regarding this 404 error: 404 error log does anyone have a solution? i know for a fact that the php and the config files point correctly at each other: config file: http://www.monahan.co.uk/getServerStatus.php php code located here:http://www.monahan.co.uk/getServerStatus.php (added the hello so that it shows something rather than blank webpage)

    any suggestions?

    just as a note, i run the minecraft server on one machine and the webserver is on a different machine in the same house.

    thanks in advance for an answer

    James

  • Avatar of wruczek wruczek Nov 21, 2013 at 02:54 UTC - 0 likes

    Wow, 10,000 downloads! Congratulations!

    My plugins:


    Sorry for spelling mistakes. I'm from Poland ;)

  • Avatar of colo3000 colo3000 Nov 13, 2013 at 00:51 UTC - 0 likes

    Can someone tell me how to set all of this up because I am not very technical. Thanks in advance!

  • Avatar of server075 server075 Nov 02, 2013 at 01:17 UTC - 0 likes

    There's no Ticket Section, DERP A+

    server075  island-pvp

    Link: Island-pvp and Skyblock

    Server ip: Play.Server075.COM

    Server ip: Play.SkyBlock.NL

Facts

Date created
Aug 18, 2012
Categories
Last update
Jul 20, 2013
Development stage
Release
Language
  • enUS
License
All Rights Reserved
Curse link
ServerStatus
Downloads
13,638
Recent files

Authors