001 package org.bukkit.event.entity; 002 003 import org.bukkit.entity.Entity; 004 import org.bukkit.entity.Projectile; 005 import org.bukkit.event.Cancellable; 006 import org.bukkit.event.HandlerList; 007 008 /** 009 * Called when a projectile is launched. 010 */ 011 public class ProjectileLaunchEvent extends EntityEvent implements Cancellable { 012 private static final HandlerList handlers = new HandlerList(); 013 private boolean cancelled; 014 015 public ProjectileLaunchEvent(Entity what) { 016 super(what); 017 } 018 019 public boolean isCancelled() { 020 return cancelled; 021 } 022 023 public void setCancelled(boolean cancel) { 024 cancelled = cancel; 025 } 026 027 @Override 028 public Projectile getEntity() { 029 return (Projectile) entity; 030 } 031 032 @Override 033 public HandlerList getHandlers() { 034 return handlers; 035 } 036 037 public static HandlerList getHandlerList() { 038 return handlers; 039 } 040 }