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.
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)
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:
List of GET headers
sec - The security key
status - Status of the server, can be Online or Offline
name - Name of the server, loaded from server-properties file
motd - Server's message of the day from server-properties file
ip - IP adress of the server, loaded from server-properties file
port - Port of server behind the IP adress, loaded from server-properties file
plsnum - Number of online players
maxnum - Maximum number of players, loaded from server-properties file
players - List of online players
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")
plversion - Contains version number of this plugin
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! :))
This is quite nice simple plugin and I'm curious to use it. The problem is that my .php file is on the other server so when someone joins in or lefts out the game server, it makes a big lag to whole game server until the other server has got the information that someone joined or left.
Is there any fix that the plugin won't lag the whole server when it's sending the information to other server?
Can somebody please help me, i dont really know how to use this, i installed the .jar and put the .php file at: C:\xampp\htdocs\community\serverstatus\getServerStatus.php how do i make it visible at my Xenforo forum?
It didnt work on my server I input the jar into the minecraft-server, edit the config.yml and insert the getserverstatus.php into my apache server. But when i now open the getserverstatus.php in my browser i get a blank page
Yay! MOTD Feature is added!
Great Job, i have not had anytime to test, i will test it tomorrow and send you feedback...
Btw, i have the refresher, i can just edit the code to get it to work with your plugin.
"Player lol1 has joined the game"
and
"Player §2[user]§flol1§f has left the game"
are 2 $_GET["log"] strings.
at logout, the prefix is still there
prefix comes from the plugin : EssentialsGroupManager.jar
if you've just updated the site it might be useful to have a transmit command that you manually send data to your site, instead of logging in and out each time.
the plugin (v1.1) is not triggering the logout (on the 1.3.1-R2 server).
So if you have a few times logged in, the plugin sends at a given moment that 15/10 people are in the server (but there is actually 1/10).
Yes, it would. JavaScript can read GET headers like PHP, I have been thinking about it. But there would be a big problem with your security key, becouse everybody will be able to read it from your page's source code. Only way would be to remove security key.
@Desertive
In next plugin version I will add connection timeout to config.yml, maybe it will fix this problem.
Hello!
This is quite nice simple plugin and I'm curious to use it. The problem is that my .php file is on the other server so when someone joins in or lefts out the game server, it makes a big lag to whole game server until the other server has got the information that someone joined or left.
Is there any fix that the plugin won't lag the whole server when it's sending the information to other server?
@gjwakker
I fixed it in latest version.
@marinus15
Move it to C:\xampp\www\ The whole plugin folder
Can somebody please help me, i dont really know how to use this, i installed the .jar and put the .php file at: C:\xampp\htdocs\community\serverstatus\getServerStatus.php how do i make it visible at my Xenforo forum?
@PerwinCZ
the security key is enable and correct
@PerwinCZ
it isn't sending the SecurityKey !!
but my bug is Fixed ;)
config:
log:
@DarkMinecrafter
Make sure that you have useSecurityKey set to true and your security key is correct.
When i manual make the command http://mc-hg.de/getServerStatus.php?ip=11111 than it will write into the status.txt but the plugin do nothing
It didnt work on my server I input the jar into the minecraft-server, edit the config.yml and insert the getserverstatus.php into my apache server. But when i now open the getserverstatus.php in my browser i get a blank page
Yay! MOTD Feature is added! Great Job, i have not had anytime to test, i will test it tomorrow and send you feedback... Btw, i have the refresher, i can just edit the code to get it to work with your plugin.
@gjwakker
Ok it should be fixed in new plugin version. :) Problem is that the plugin is obtaining display name instead of the original name.
Found it !!
"Player lol1 has joined the game" and "Player §2[user]§flol1§f has left the game"
are 2 $_GET["log"] strings. at logout, the prefix is still there
prefix comes from the plugin : EssentialsGroupManager.jar
if you've just updated the site it might be useful to have a transmit command that you manually send data to your site, instead of logging in and out each time.
okay then I will just continue testing
@gjwakker
Hmm I don't know but it's working for me and my server without problems...
PerwinCZ
the plugin (v1.1) is not triggering the logout (on the 1.3.1-R2 server). So if you have a few times logged in, the plugin sends at a given moment that 15/10 people are in the server (but there is actually 1/10).
if you want to test you may use http://demo1.gezelligeserver.hostzi.com/web/status.php as link in the plugin
and then you wil see the resolt on http:demo1.gezelligeserver.hostzi.com/web/
to download this script, see comend #13
it is either not getting the info from my server, or it's not able to write to the text file, either way it does not seem to be working :/
@mycraftnetwork
Yes, it would. JavaScript can read GET headers like PHP, I have been thinking about it. But there would be a big problem with your security key, becouse everybody will be able to read it from your page's source code. Only way would be to remove security key.
I think you're really need a server-side script like php