InfoApi
InfoApi is a Plugin for Bukkit Minecraft Server.
It let's you query generic Information from the Server itself through Standard HTTP Requests and so make it possible to Integrate this Stats to any other Webpage.
You will get a Standard HTTP Answer with the Queryresults or if there was an Error or nothing to return then you will get a HTTP Error Code (most likely a 500 Internal Server Error).
This Plugin needs a Counterpart on the Requesting Client (Script Server (like PHP or ASP) or Webbrowser) to do fancy Things with the Results because this Plugin is intended to modify the Results as less then possible.
Code to Manipulate and refactor the Results in various Scripting Languages will also be released as soon as they become important.
Examples of usable Commands:
- version - returns current Server Version
- mayplayer - returns current maximum Amount of allowed Player on Server
- playerlist - returns list of Players currently playing on the Server
Initial Idea and Originally done by Seta (http://forums.bukkit.org/members/seta.1112/) now Janka flavored
I love you API! It so simply and beautifull. Can you add the /cmd/random_command query? It's my little dream :3
@mpw1993
You're welcome :)
@Ka_Jan
Okay, thanks for the detailed description of the ram command :). My programm is running without problems now, and i didn't get the Socket error any more, althoug I made a timer, which made a request every 100 ms. I think somewhere I made two requests at the same moment, but now I use only one method to request the data and it works fine :)
Thank you for your patience with me :D
Greets MPW
@mpw1993
This bukkitdev is borked beyond repair. There is next to Nothing of Documentation about this. Maybe I'm just stupid. If someone know how to fix this Issue I will greatly appreciate the help and will honor it with a big header stating that I'm too stupid and would be nothing without
<<x>>
es Help :D.About your Problem:
Well, you found out that you query too fast :) And that's what I wanted to suggest. Slow down the Requests. That's because the HTTP Protocol is not really the best Choice for this Usage. But there is next to no Alternative :) Regarding Simplicity and Accessibility. Also I didn't implement multi-threaded behavior. There's just 1 Thread with one Listener. If it is blocked and the next Requests comes in it doesn't answer :/ Maybe I will fix that in an later Release.
The Second Error sounds like the ServerSocket listened successfully to your Request and then booted (like in kicking) the ClientSocket and thus can't write back on the Socket and disconnecting the Client in the Progress of global Confusion. :) But the Error Message is kinda confusing because there shouldn't exist a "permanent" Connection between Client and Server.
I will add a Page to the Plugin describing every Command you can Use :) In the Version Notes of the File there should be a Description.
Well I checked and there is none :) If I remember it's a / separated List with 3 Variables.
The First Value states how much Memory the JVM hasn't jet allocated, Max Memory returns the Maximum Amount of Memory useable by the JVM and at last Total Memory is the Total Amount of Memory AT THIS VERY MOMENT allocateable by the JVM :)
And the Values are (as good as Java is at calculating) calculated to represent MB
I can't make a Ticket, don't know why, but there ist no Button/Link next to the download button.I tried another plugin and there was a ticket button.
Sometimes i get the error: "Connection was succesfully closed" ("Die Verbindung wurde erfolgreich geschlossen."), but it means there was an error while getting the data over http/GET.
Okay, I found a solution for this error, I sleep for 0.5 seconds between the requests and the error disappeared nearly complete. It's now very rare.
Another error I get is: "Socket-Error #10053. Software caused a disconnection" ("Socket-Fehler #10053. Software verursachte einen Verbindungsabbruch") The plugin seems to work fine after the error. There is no error in the console log.
I try to debug my own code, maybe i made a mistake somewhere.
Can you write a detailed documentatin about the possible requests. Whats the order of the "ram" command?
Hope I can help you with this
Greets MPW
@mpw1993
Thanks for the Kudos;
Chatlog and PlayerInfo will be integrated in the Next Release.
Can you give some Details about the Error that occurs when you do many Requests? Does the Plugin Work after the Error(s) occurs?
There seem some Problems with my Implementation of Sockets but i'm not really sure if it's the Thread or the Approach i use for Read/Write to the Socket itself or just an hiccup of Java itself. I checked around the Web to find out how other Programmers do this Sort of Stuff but it seems that my Code is quite okay the way it is.
You don't have to be sorry for your English, as long as everybody understands what you need/want/have to say in general it is sufficient :) I'm Austrian so I know how Tricky English is.
Can you create a Ticket for you Inquiry? I seem to don't have Permissions to make a Ticket out of your Comment :/ I am also not quite sure if I missed something while setting up this PlugIn on bukkitdev.
Hey! This is a nice Plugin. I use this with a programm I've written in Delphi. But it would be nice to have more information about the available commands. Can you also reintegrate the "chat" and the "playerinfo" command. Sometimes I have errors when I use many api requests in a short time. I think this is because of Java, and is not possible to be fixed.
Sorry for my bad English. I'm German .
With Greets
MPW