Moved HeroChat code to HeroWebChatModule.
This commit is contained in:
parent
b2cb15b75c
commit
987e6bcb54
7 changed files with 83 additions and 35 deletions
15
src/main/java/org/dynmap/SimpleWebChatComponent.java
Normal file
15
src/main/java/org/dynmap/SimpleWebChatComponent.java
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package org.dynmap;
|
||||
|
||||
public class SimpleWebChatComponent extends Component {
|
||||
|
||||
public SimpleWebChatComponent(final DynmapPlugin plugin, ConfigurationNode configuration) {
|
||||
super(plugin, configuration);
|
||||
plugin.events.addListener("webchat", new Event.Listener<ChatEvent>() {
|
||||
@Override
|
||||
public void triggered(ChatEvent t) {
|
||||
plugin.getServer().broadcastMessage("[WEB]" + t.name + ": " + t.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue