mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
17b58d00d8
This was a useless exception wrapper that ends up making stack traces harder to read as well as the JVM cutting off the important parts Nothing catches this exception, so its safe to just get rid of it and let the REAL exception bubble down
45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
From 927a3bee043bc15d1c0c0f60be3e4afb3f440ab6 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Fri, 22 Apr 2016 01:43:11 -0500
|
|
Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
|
index 976b80b7..a5ac3edf 100644
|
|
--- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
|
+++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
|
@@ -12,12 +12,31 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
|
|
private boolean cancelled;
|
|
private double amount;
|
|
private final RegainReason regainReason;
|
|
+ private final boolean isFastRegen; // Paper
|
|
|
|
public EntityRegainHealthEvent(final Entity entity, final double amount, final RegainReason regainReason) {
|
|
+ // Paper start - Forward
|
|
+ this(entity, amount, regainReason, false);
|
|
+ }
|
|
+
|
|
+ public EntityRegainHealthEvent(final Entity entity, final double amount, final RegainReason regainReason, boolean isFastRegen) {
|
|
+ // Paper end
|
|
super(entity);
|
|
this.amount = amount;
|
|
this.regainReason = regainReason;
|
|
+ this.isFastRegen = isFastRegen; // Paper
|
|
+ }
|
|
+
|
|
+ // Paper start - Add getter for isFastRegen
|
|
+ /**
|
|
+ * Is this event a result of the fast regeneration mechanic
|
|
+ *
|
|
+ * @return Whether the event is the result of a fast regeneration mechanic
|
|
+ */
|
|
+ public boolean isFastRegen() {
|
|
+ return isFastRegen;
|
|
}
|
|
+ // Paper end
|
|
|
|
/**
|
|
* Gets the amount of regained health
|
|
--
|
|
2.20.1
|
|
|