Created
June 29, 2012 23:41
-
-
Save jmhertlein/3021437 to your computer and use it in GitHub Desktop.
Listeners (CraftBukkit)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //let's say we're replacing this: | |
| public MyChatListener extends ChatListener { | |
| public void onPlayerChat(PlayerChatEvent event) { | |
| //do something | |
| } | |
| } | |
| //We'll change it to this: | |
| public class MyCustomListener implements Listener { | |
| @EventHandler | |
| public void onPlayerSaySomething(PlayerChatEvent e) { | |
| //do something | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment