mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-12-28 03:57:42 +01:00
58 lines
1.7 KiB
Diff
58 lines
1.7 KiB
Diff
From a061b2e73ed5baaa75e744ba0e72d3ac4d479ac4 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sun, 4 Dec 2016 15:09:48 -0500
|
|
Subject: [PATCH] EMC LivingEntityArmorProtectEvent
|
|
|
|
---
|
|
.../LivingEntityArmorProtectEvent.java | 38 +++++++++++++++++++
|
|
1 file changed, 38 insertions(+)
|
|
create mode 100644 src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java
|
|
|
|
diff --git a/src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java b/src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java
|
|
new file mode 100644
|
|
index 00000000..07e09573
|
|
--- /dev/null
|
|
+++ b/src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java
|
|
@@ -0,0 +1,38 @@
|
|
+package com.empireminecraft.customevents;
|
|
+
|
|
+import org.bukkit.entity.LivingEntity;
|
|
+import org.bukkit.event.HandlerList;
|
|
+import org.bukkit.event.entity.EntityEvent;
|
|
+
|
|
+public class LivingEntityArmorProtectEvent extends EntityEvent {
|
|
+
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
+ private final LivingEntity entity;
|
|
+
|
|
+ private double armorValue = 0;
|
|
+
|
|
+ public LivingEntityArmorProtectEvent(LivingEntity entity, double armorValue) {
|
|
+ super(entity);
|
|
+ this.entity = entity;
|
|
+ this.armorValue = armorValue;
|
|
+ }
|
|
+ public double getArmorValue() {
|
|
+ return armorValue;
|
|
+ }
|
|
+
|
|
+ public void setArmorValue(double armorValue) {
|
|
+ this.armorValue = armorValue;
|
|
+ }
|
|
+
|
|
+ public LivingEntity getEntity() {
|
|
+ return entity;
|
|
+ }
|
|
+
|
|
+ public HandlerList getHandlers() {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ public static HandlerList getHandlerList() {
|
|
+ return handlers;
|
|
+ }
|
|
+}
|
|
--
|
|
2.25.1.windows.1
|
|
|