WebSocketServices

WebSocketServices

Server Information

This plug-in is an ongoing and evolving project with the intent to bring web support, through websockets, to the Minecraft bukkit servers. This implementation of websockets is designed to be light-weight and simple, reducing overhead to the game server itself. Clients that support websockets will have the ability to perform simple informational queries, such as who is online, what version the server is running on, etc. All text base results will be returned in a simple JSON format for consistency.

Services

Services are text-based methods that a client-side script can invoke through the WebSocketServices plug-in in order to retrieve more information about a Minecraft server. Additionally, each service can be enabled or disabled depending on the user's preference. The following services listed below are currently available and can be expanded through the use of custom plugins:

  1. Info - Information about the server such as the address, MOTD, version, game mode, etc.
  2. WHO - Information about the users currently online.
  3. Whitelist - Information about who is currently white-listed.
  4. Plugins - Information about all the plug-ins running on the server.
  5. OfflinePlayers - Information about all offline players.
  6. Player - Information about a specific player.

Sample site

A sample implementation of client-side scripting running against this plugin can be found at the URL listed below. The site is running in pure HTML5 & JS. Please note that the sample site requires an HTML5 & WebGL capable browser.

http://www.caffeinatedrat.com/minecraft/

Compatibility Notes

This plugin is only supported by browsers that support Websockets Protocol 13 RFC 6455. These browsers include:

  • Firefox 11+
  • Chrome 16+
  • Safari 6+
  • IE 10+

BUG NOTICE (Versions 1.1.6 and lower)

There is currently a bug in the offlinePlayer service, where all calls to it are rejected. It's a very simple fix and will be fixed in version 1.1.7. To fix the issue on your server, go to config.yml for this plug-in and rename the offlinePlayers to offlineplayers. It must be all lower case, as show below. I apologize for any inconvenience this may be causing at this time.

services:
  ...
  offlineplayers: true
  ...

Configuration

Detailed information about your servers configuration can be found here.

For Non-Developers

A client-side package is included with this plug-in, in the form of an example. In order to use the client-side package, you will have to have either a hosted web-site or a blog, where your server information can be viewed.

An example of a blog implementation can be found at http://blog.caffeinatedrat.com (apologies if the site cannot be reached. I'm currently having problems with my host).

For Developers

An additional client-side library called websocketservices.min.js is available on github and is included in the downloadable package. This library should be able to provide the most simplest of implementations. If you prefer something more complex or something that you'd like to tailor to your tastes, please read the sections below.

Client-Side Development Notes

The WebSocketServices API can be found at the github wiki location listed below.

https://github.com/CaffeinatedRat/WebSocketServices/wiki

Samples of code implementation can be found on github under 'examples/client-side/', as well as on the sample site listed above.

Extensions

WebSocketServices can be expanded through the use of custom development. Plug-ins can hook into the WebSocketServices server by creating their own ApplicationLayer and registering with static method WebSocketServices.registerApplicationLayer(Plugin plugin, IApplicationLayer applicationLayer). Further details will be released on the github wiki in the near future.

Source

Source code and further development of the plugin can be found at the following github repo:

https://github.com/CaffeinatedRat/WebSocketServices


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    46337
  • Created
    Oct 23, 2012
  • Last Released File
    Mar 23, 2015
  • Total Downloads
    8,798
  • License

Categories

Members

Recent Files