mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
added configurable suffix for webchat
This commit is contained in:
parent
cd02926fb0
commit
af51d8b7e0
@ -104,7 +104,8 @@ showplayerfacesinmenu: true
|
||||
joinmessage: "%playername% joined"
|
||||
quitmessage: "%playername% quit"
|
||||
spammessage: "You may only chat once every %interval% seconds."
|
||||
webprefix: "[WEB] "
|
||||
webprefix: "¤2[WEB] "
|
||||
websuffix: "¤f"
|
||||
|
||||
defaultzoom: 0
|
||||
defaultworld: world
|
||||
|
@ -44,7 +44,7 @@ public class InternalClientUpdateComponent extends ClientUpdateComponent {
|
||||
protected void webChat(String name, String message) {
|
||||
// TODO: Change null to something meaningful.
|
||||
plugin.mapManager.pushUpdate(new Client.ChatMessage("web", null, name, message, null));
|
||||
Log.info(plugin.configuration.getString("webprefix", "[WEB] ") + name + ": " + message);
|
||||
Log.info(plugin.configuration.getString("webprefix", "¤2[WEB] ") + name + ": " + plugin.configuration.getString("websuffix", "¤f") + message);
|
||||
ChatEvent event = new ChatEvent("web", name, message);
|
||||
plugin.events.trigger("webchat", event);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent {
|
||||
protected void webChat(String name, String message) {
|
||||
// TODO: Change null to something meaningful.
|
||||
plugin.mapManager.pushUpdate(new Client.ChatMessage("web", null, name, message, null));
|
||||
Log.info(plugin.configuration.getString("webprefix", "[WEB] ") + name + ": " + message);
|
||||
Log.info(plugin.configuration.getString("webprefix", "¤2[WEB] ") + name + ": " + plugin.configuration.getString("websuffix", "¤f") + message);
|
||||
ChatEvent event = new ChatEvent("web", name, message);
|
||||
plugin.events.trigger("webchat", event);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ public class SimpleWebChatComponent extends Component {
|
||||
plugin.events.addListener("webchat", new Event.Listener<ChatEvent>() {
|
||||
@Override
|
||||
public void triggered(ChatEvent t) {
|
||||
plugin.getServer().broadcastMessage(plugin.configuration.getString("webprefix", "[WEB] ") + t.name + ": " + t.message);
|
||||
plugin.getServer().broadcastMessage(plugin.configuration.getString("webprefix", "¤2[WEB] ") + t.name + ": " + plugin.configuration.getString("websuffix", "¤f") + t.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@ public class HeroWebChatComponent extends Component {
|
||||
public void triggered(ChatEvent t) {
|
||||
/* Let HeroChat take a look - only broadcast to players if it doesn't handle it */
|
||||
if (!handler.sendWebMessageToHeroChat(t.name, t.message)) {
|
||||
plugin.getServer().broadcastMessage(plugin.configuration.getString("webprefix", "[WEB] ") + t.name + ": " + t.message);
|
||||
plugin.getServer().broadcastMessage(plugin.configuration.getString("webprefix", "¤2[WEB] ") + t.name + ": " + plugin.configuration.getString("websuffix", "¤f") + t.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user