summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCeltic Minstrel <celtic.minstrel.ca@some.place>2012-03-12 12:45:28 -0400
committerEvilSeph <evilseph@gmail.com>2012-03-15 07:12:23 -0400
commit74ff160f58b059177ad5080b6f1a7f75f13a74de (patch)
treee10f2b266a723806800bc16182916eddd4d27ab3 /src
parent4e32eebf05ebaf1254bc973a743b2fbaedf39599 (diff)
downloadbukkit-74ff160f58b059177ad5080b6f1a7f75f13a74de.tar
bukkit-74ff160f58b059177ad5080b6f1a7f75f13a74de.tar.gz
bukkit-74ff160f58b059177ad5080b6f1a7f75f13a74de.tar.lz
bukkit-74ff160f58b059177ad5080b6f1a7f75f13a74de.tar.xz
bukkit-74ff160f58b059177ad5080b6f1a7f75f13a74de.zip
[Bleeding] Added ProjectileLaunchEvent. Addresses BUKKIT-284
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/event/entity/ProjectileLaunchEvent.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/entity/ProjectileLaunchEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileLaunchEvent.java
new file mode 100644
index 00000000..0c9190ca
--- /dev/null
+++ b/src/main/java/org/bukkit/event/entity/ProjectileLaunchEvent.java
@@ -0,0 +1,40 @@
+package org.bukkit.event.entity;
+
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.Projectile;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+
+/**
+ * Called when a projectile is launched.
+ */
+public class ProjectileLaunchEvent extends EntityEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancelled;
+
+ public ProjectileLaunchEvent(Entity what) {
+ super(what);
+ }
+
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+
+ @Override
+ public Projectile getEntity() {
+ return (Projectile) entity;
+ }
+
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}