Moved HeroChat code to HeroWebChatModule.
This commit is contained in:
parent
b2cb15b75c
commit
987e6bcb54
7 changed files with 83 additions and 35 deletions
|
|
@ -54,7 +54,6 @@ public class DynmapPlugin extends JavaPlugin {
|
|||
public ConfigurationNode configuration;
|
||||
public HashSet<String> enabledTriggers = new HashSet<String>();
|
||||
public PermissionProvider permissions;
|
||||
public HeroChatHandler hchand;
|
||||
public ComponentManager componentManager = new ComponentManager();
|
||||
public Events events = new Events();
|
||||
|
||||
|
|
@ -106,8 +105,6 @@ public class DynmapPlugin extends JavaPlugin {
|
|||
timer.scheduleAtFixedRate(new JsonTimerTask(this, configuration), jsonInterval, jsonInterval);
|
||||
}
|
||||
|
||||
hchand = new HeroChatHandler(configuration, this, getServer());
|
||||
|
||||
enabledTriggers.clear();
|
||||
List<String> triggers = configuration.getStrings("render-triggers", new ArrayList<String>());
|
||||
if (triggers != null)
|
||||
|
|
@ -415,8 +412,7 @@ public class DynmapPlugin extends JavaPlugin {
|
|||
public void webChat(String name, String message) {
|
||||
mapManager.pushUpdate(new Client.ChatMessage("web", null, name, message, null));
|
||||
Log.info("[WEB]" + name + ": " + message);
|
||||
/* Let HeroChat take a look - only broadcast to players if it doesn't handle it */
|
||||
if(hchand.sendWebMessageToHeroChat(name, message) == false)
|
||||
getServer().broadcastMessage("[WEB]" + name + ": " + message);
|
||||
ChatEvent event = new ChatEvent("web", name, message);
|
||||
events.trigger("webchat", event);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue