-
-
Save anonymous/69fbabe111b562b5da3f to your computer and use it in GitHub Desktop.
This file contains 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
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.entity.EntityShootBowEvent; | |
import org.bukkit.event.entity.ProjectileLaunchEvent; | |
import org.bukkit.event.player.PlayerInteractEvent; | |
public class Ability implements Listener { | |
/* | |
* .... snip | |
*/ | |
@EventHandler | |
public void onAbility (PlayerAbilityEvent e) { | |
if(e.isInteractEvent()) { | |
PlayerInteractEvent event = e.getPlayerInteractEvent(); | |
//Do stuff with event | |
}else if(e.isEntityShootBowEvent()) { | |
EntityShootBowEvent event = e.getEntityShootBowEvent(); | |
//Do stuff with event | |
}else if(e.isProjectileLaunchEvent()) { | |
ProjectileLaunchEvent event = e.getProjectileLaunchEvent(); | |
//Do stuff with event | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment