ServerEvents

Note: the original plugin and almost all of the work done on it is by croemmich. He doesn't have the time to work it any more, so he's allowed me to maintain it.



ServerEvents prints customizable messages to chat, Twitter, a database, or to a file. See the configuration file below for a better idea of what the plugin does.

http://img205.imageshack.us/img205/7703/servereventstwitter.png



If you appreciate this plugin, you are welcome to https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif.



Installation

  1. Download mysql-connector-java-bin.jar and twitter4j-core.jar and place them in the root server directory.
  2. Download ServerEvents.jar and place it in the plugin directory.
  3. Start the Minecraft server to generate the configuration file.
  4. To enable output to Twitter, run the command /serverevents register (requires permission serverevents.register) and follow the directions it gives. It can be run from server console or in-game. Alternately, if for whatever reason you don't want to use the command, you can use the old method of running "java -jar ServerEvents.jar" from the command line.
  5. Edit server_events.xml to your liking.
  6. Restart the server, or use the command /serverevents reload (requires permission serverevents.reload) to make the plugin re-load any changes you've made to server_events.xml.



Developer API
ServerEvents now has a developer API that allows developers to add, remove, and trigger messages. Currently there is not built in support for custom message types, however you can implement that on your own.

Implementation

Add ServerEvents.jar to your build path. In Eclipse -> Add External Jar

Place the following in your plugin's onEnable().

Plugin serverevents = this.getServer().getPluginManager().getPlugin("ServerEvents");
if (serverevents != null) {
	if (!serverevents.isEnabled()) {
		getServer().getPluginManager().enablePlugin(serverevents);
	}
} else {
	log.info("ServerEvents plugin not installed. Disabling plugin.");
	this.getServer().getPluginManager().disablePlugin(this);
}

Then simply make API calls anywhere in your code.

/* Add/Remove Messages */
ServerEvents.addMessage(Messages.Type.RANDOM, "Hello World!");
ServerEvents.removeMessage(Messages.Type.RANDOM, "Hello World!");
/* Add a message with parameters */
HashMap<String, String> params = new HashMap<String, String>();
params.put("cmd", "/i 1 64");
params.put("full", "true");
ServerEvents.addMessage(Messages.Type.COMMAND, "%n used the command: %cmd", params);
/* Display a message right now. */
ServerEvents.displayMessage("Hello World!");



View Changelog



Source - https://github.com/Brettflan/ServerEvents



For old discussion of this mod, you can head over to the main Bukkit forum:
http://forums.bukkit.org/threads/1796/



Thanks to mrgreaper for the idea and messages!


Comments

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

About This Project

  • Project ID
    31722
  • Created
    Sep 1, 2011
  • Last Released File
    Jun 28, 2016
  • Total Downloads
    18,333
  • License

Categories

Members

Recent Files

Bukkit