Search in sources :

Example 1 with EzyHashMapSet

use of com.tvd12.ezyfox.util.EzyHashMapSet in project ezyfox-server by youngmonkeys.

the class EzyBroadcastPluginsEventImpl method getPluginContextMaps.

private EzyMapSet<EzyConstant, EzyPluginContext> getPluginContextMaps() {
    Collection<EzyPluginContext> pluginContexts = context.getPluginContexts();
    EzyMapSet<EzyConstant, EzyPluginContext> pluginContextMaps = new EzyHashMapSet<>();
    for (EzyPluginContext pluginContext : pluginContexts) {
        EzyPluginSetting pluginSetting = pluginContext.getPlugin().getSetting();
        Set<EzyConstant> listenEvents = pluginSetting.getListenEvents().getEvents();
        for (EzyConstant listenEvent : listenEvents) {
            pluginContextMaps.addItem(listenEvent, pluginContext);
        }
    }
    return pluginContextMaps;
}
Also used : EzyPluginContext(com.tvd12.ezyfoxserver.context.EzyPluginContext) EzyConstant(com.tvd12.ezyfox.constant.EzyConstant) EzyHashMapSet(com.tvd12.ezyfox.util.EzyHashMapSet) EzyPluginSetting(com.tvd12.ezyfoxserver.setting.EzyPluginSetting)

Aggregations

EzyConstant (com.tvd12.ezyfox.constant.EzyConstant)1 EzyHashMapSet (com.tvd12.ezyfox.util.EzyHashMapSet)1 EzyPluginContext (com.tvd12.ezyfoxserver.context.EzyPluginContext)1 EzyPluginSetting (com.tvd12.ezyfoxserver.setting.EzyPluginSetting)1