From 8e24ceec37ab2fb1a40b0004a4b01b137f501a1f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 May 2018 20:25:37 -0400 Subject: [PATCH] EMC BlazeLaunchFireballEvent --- .../BlazeLaunchFireballEvent.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java diff --git a/src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java b/src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java new file mode 100644 index 000000000..029a1f9a1 --- /dev/null +++ b/src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.empireminecraft.customevents; + +import org.bukkit.entity.Blaze; +import org.bukkit.entity.SmallFireball; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; +import org.bukkit.event.entity.EntityEvent; + +public class BlazeLaunchFireballEvent extends EntityEvent implements Cancellable { + private final SmallFireball fireball; + + public BlazeLaunchFireballEvent(Blaze blaze, SmallFireball fireball) { + super(blaze); + this.fireball = fireball; + } + + public SmallFireball getFireball() { + return fireball; + } + + private static final HandlerList handlers = new HandlerList(); + + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + private boolean cancelled = false; + + @Override + public boolean isCancelled() { + return cancelled; + } + + @Override + public void setCancelled(boolean cancel) { + cancelled = cancel; + } +} -- 2.25.1.windows.1