ServerStatus

Online

ServerStatus

Current version

  • Actual version is v1.5.3 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: 0
ignore-list: 'player1,player2,player3'
refresh-rate: 0
  • 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 seconds)
  • 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.

.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.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?

Click here to donate with PayPal

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

  • Avatar of RoelandCache RoelandCache May 15, 2013 at 18:37 UTC - 0 likes

    @PerwinCZ: Go

    I did some additional investigation. Basically, my refresh-rate was set to 0. This is the default value. So, if you have your refresh-rate set to default value of 0, your web server will get attacked. This is obviously a bug that should be fixed. Either 0 should default to 60 seconds (or some other value) or only update when changes happen.

    I changed it to 60 seconds and it seems to be following that in the web logs and my best is the Socket Timeout issue will go away now.

  • Avatar of RoelandCache RoelandCache May 15, 2013 at 17:13 UTC - 0 likes

    @PerwinCZ: Go

    I have disabled the plugin until it gets fixed.

    In approx. 3 hours, I have 192,129 connections to my web server from this plugin.

  • Avatar of RoelandCache RoelandCache May 15, 2013 at 17:01 UTC - 0 likes

    @PerwinCZ: Go

    I wouldn't be so fast to tell someone it's not your code.

    I'm getting these timeout notices in the log as well. I was really surprised to see that your hitting my web server with 20 requests PER SECOND. Flooding a server like this is like a denial of service attack and no wonder why servers are getting sick and rejecting the requests.

    In all honesty, the code should be written to only update when a status changes, like someone logs in or logs out.

    In response to the person upset it doesn't report the Minecraft server as being down when it's down, it's because this plugin can't run when it's down, so the last known state before going down is what you will see.

  • Avatar of gjwakker gjwakker May 07, 2013 at 22:00 UTC - 0 likes

    @SureShotM: Go

    Is the .Png in the same folder as your web-page?

  • Avatar of SureShotM SureShotM May 03, 2013 at 07:15 UTC - 0 likes

    Hi, Im having trouble showing the banner on my site, what am I doing wrong, I have my site including the php file when I look in my ftp it says theres a banner.png, but when I try to grab the image using <image src="banner.png"> it wont show up. Please Help!!

  • Avatar of wazoomie wazoomie May 01, 2013 at 23:00 UTC - 0 likes

    I love this plugin! I use it to store all players in a database with their join date, online time etc.

    Could you maybe extend this plugin with another functionality? I would really like if this plugin could catch certain /commands and send them to the server via a php file.

    Example: - player chat input: <wazoomie>: /register 1C16 F56E - php headers: player=wazoomie&command=register&args=1C16,F56E

    This would allow players to register their website account from within the game or let them redeem gift codes.

  • Avatar of PerwinCZ PerwinCZ May 01, 2013 at 07:31 UTC - 0 likes

    @zaklaus: Go

    There is some problem with connecting from server to the PHP file, so it isn't error of my plugin, I can't tell you more.

    @BenRush: Go

    You can use this prepared PHP file: http://dev.bukkit.org/server-mods/serverstatus/pages/php-file/

    DigitalClock Usage ServerStatus Usage

  • Avatar of Codyl16 Codyl16 Apr 27, 2013 at 16:01 UTC - 0 likes

    in 1.5.1 it is saying that it is still online when it is not, and it will not list the number of players online, it's doing this in both banner format and in the file format

  • Avatar of zaklaus zaklaus Apr 27, 2013 at 13:06 UTC - 0 likes

    hi, I have this problem

    2013-04-27 15:03:20 [SEVERE] [ServerStatus] IOException: java.net.SocketTimeoutException: connect timed out
    

    I have php file on my remote web. Ive set callurl. Whats wrong with this?

    SK. Naozaj neviem ako to fixnúť. Skúšal som nastaviť aj práva.

    Last edited Apr 27, 2013 by zaklaus
  • Avatar of BenRush BenRush Apr 21, 2013 at 16:53 UTC - 0 likes

    any tutorials how to make get headers? :/

Facts

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

Authors