/** *

Fired when a player shoots a gun.

* * @author Ocelot */ public class GunFireEvent extends PlayerEvent { private final ItemStack stack; public GunFireEvent(Player player, ItemStack stack) { super(player); this.stack = stack; } /** * @return The stack the player was holding when firing the gun */ public ItemStack getStack() { return stack; } /** * @return Whether or not this event was fired on the client side */ public boolean isClient() { return this.getPlayer().getCommandSenderWorld().isClientSide(); } /** *

Fired when a player is about to shoot a bullet.

* * @author Ocelot */ @Cancelable public static class Pre extends GunFireEvent { public Pre(Player player, ItemStack stack) { super(player, stack); } } /** *

Fired after a player has shot a bullet.

* * @author Ocelot */ public static class Post extends GunFireEvent { public Post(Player player, ItemStack stack) { super(player, stack); } } }