Skip to content

Commit

Permalink
Use the right annotation to subscribe.
Browse files Browse the repository at this point in the history
  • Loading branch information
csmith committed Feb 14, 2016
1 parent f4c35db commit 6b1e6e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/com/dmdirc/plugins/PluginEventFormatManager.java
Expand Up @@ -32,8 +32,6 @@
import com.dmdirc.ui.messages.MultiEventFormatProvider;
import com.dmdirc.ui.messages.YamlEventFormatProvider;

import com.google.common.eventbus.Subscribe;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
Expand All @@ -42,6 +40,8 @@
import javax.inject.Inject;
import javax.inject.Singleton;

import net.engio.mbassy.listener.Handler;

/**
* Loads default event formats from plugins.
*
Expand Down Expand Up @@ -76,7 +76,7 @@ public void shutDown() {
eventbus.unsubscribe(this);
}

@Subscribe
@Handler
public void handlePluginLoaded(final PluginLoadedEvent event) {
final Path path = event.getPlugin().getPath("/META-INF/format.yml");
if (Files.exists(path)) {
Expand All @@ -88,7 +88,7 @@ public void handlePluginLoaded(final PluginLoadedEvent event) {
}
}

@Subscribe
@Handler
public void handlePluginUnloaded(final PluginUnloadedEvent event) {
if (providers.containsKey(event.getPlugin())) {
multiEventFormatProvider.removeProvider(providers.remove(event.getPlugin()));
Expand Down

0 comments on commit 6b1e6e7

Please sign in to comment.