Advertisement
Guest User

Untitled

a guest
Jun 9th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. In your Main class, at the onEnable method, you'd do this
  2.  
  3. @Override
  4. public void onEnable() {
  5. Bukkit.getServer().getPluginManager().registerEvents(new ListenerClass(), this);
  6. }
  7.  
  8. Make sure your Main class implements Listener. Also, replace ListenerClass with the name of your listener class.
  9.  
  10. In your Listener class, you'd create the events exactly how you would do it if you only used one class. All your event classes will need to implement the Listener interface as well.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement