API
API
:D
// to get plugin: if (this.getServer().getPluginManager().isPluginEnabled("MinecraftIM")) { MinecraftIM messenger = (MinecraftIM) this.getServer().getPluginManager().getPlugin("MinecraftIM"); } // to send messages to the main user: messenger.sendNotify("message"); // will automatically format color formatting :) // to intercept chat messages (will need the plugin as a libary in your manifest): (your class) implements ChatMessageHandler { /** * Called when MinecraftIM receives a message from the authorized user * @param message what was received * @return if this method used the command, and don't do anything else */ public boolean messageHandled(String message); /** * Called after any message received * @param fromUser what username this message came from * @param message what was received * @return if this method used the command, and don't do anything else */ public boolean messageHandled(String fromUser, String message); } // then: messenger.registerMessageHandler(your class);
Comments