From 83bf1f2f88d5c95ab7baa4a03776a927f0a6e8e1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 4 Dec 2016 15:27:06 -0500 Subject: [PATCH] EMC ZombieReinforcementEvent --- .../ZombieReinforcementEvent.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java diff --git a/src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java b/src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java new file mode 100644 index 000000000..5e0a9bb41 --- /dev/null +++ b/src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java @@ -0,0 +1,52 @@ +package com.empireminecraft.customevents; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; +import org.bukkit.event.entity.EntityEvent; + +public class ZombieReinforcementEvent extends EntityEvent implements Cancellable { + private static final HandlerList handlers = new HandlerList(); + private final LivingEntity targetEntity; + private double chance; + + public ZombieReinforcementEvent(Entity sourceZombie, LivingEntity targetEntity, double chance) { + super(sourceZombie); + this.targetEntity = targetEntity; + this.chance = chance; + } + + + public LivingEntity getTargetEntity() { + return targetEntity; + } + + public double getChance() { + return chance; + } + + public void setChance(double chance) { + this.chance = chance; + } + + 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