Skip to content

Instantly share code, notes, and snippets.

@Crypnotic
Created September 24, 2018 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Crypnotic/ce469c2ce6a9bdd65ab23b50f8874bd9 to your computer and use it in GitHub Desktop.
Save Crypnotic/ce469c2ce6a9bdd65ab23b50f8874bd9 to your computer and use it in GitHub Desktop.
@Plugin(id = "mctest")
public class MCTestVelocity {
@Subscribe
public void onProxyInitialize(ProxyInitializeEvent event) {
IPipeline alpha = MessageChannelAPI.getPipelineRegistry().register("alpha");
IPipeline bravo = MessageChannelAPI.getPipelineRegistry().register("bravo");
alpha.onReceive(alpha::send);
bravo.onReceive(bravo::send);
}
@Subscribe
public void onPluginMessage(PluginMessageEvent event) {
System.out.println(event.getIdentifier());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment