aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0094-EndermanEscapeEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0094-EndermanEscapeEvent.patch')
-rw-r--r--patches/api/0094-EndermanEscapeEvent.patch19
1 files changed, 8 insertions, 11 deletions
diff --git a/patches/api/0094-EndermanEscapeEvent.patch b/patches/api/0094-EndermanEscapeEvent.patch
index 49f4fe70d2..f81f62b72a 100644
--- a/patches/api/0094-EndermanEscapeEvent.patch
+++ b/patches/api/0094-EndermanEscapeEvent.patch
@@ -9,10 +9,10 @@ You may cancel this, enabling ranged attacks to damage the enderman for example.
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EndermanEscapeEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EndermanEscapeEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..f6be848c44d5efaca3fbc03c3be7451411943c24
+index 0000000000000000000000000000000000000000..ae72916972dbe86bfbca499eb7b6f97b1a6eae25
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EndermanEscapeEvent.java
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,83 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.Enderman;
@@ -20,22 +20,22 @@ index 0000000000000000000000000000000000000000..f6be848c44d5efaca3fbc03c3be74514
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
++@NullMarked
+public class EndermanEscapeEvent extends EntityEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
-+ @NotNull private final Reason reason;
++ private final Reason reason;
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public EndermanEscapeEvent(@NotNull Enderman entity, @NotNull Reason reason) {
++ public EndermanEscapeEvent(final Enderman entity, final Reason reason) {
+ super(entity);
+ this.reason = reason;
+ }
+
-+ @NotNull
+ @Override
+ public Enderman getEntity() {
+ return (Enderman) super.getEntity();
@@ -44,7 +44,6 @@ index 0000000000000000000000000000000000000000..f6be848c44d5efaca3fbc03c3be74514
+ /**
+ * @return The reason the enderman is trying to escape
+ */
-+ @NotNull
+ public Reason getReason() {
+ return this.reason;
+ }
@@ -57,21 +56,19 @@ index 0000000000000000000000000000000000000000..f6be848c44d5efaca3fbc03c3be74514
+ /**
+ * Cancels the escape.
+ * <p>
-+ * If this escape normally would of resulted in damage avoidance such as indirect,
++ * If this escape normally had resulted in damage avoidance such as indirect,
+ * the enderman will now take damage.
+ */
+ @Override
-+ public void setCancelled(boolean cancel) {
++ public void setCancelled(final boolean cancel) {
+ this.cancelled = cancel;
+ }
+
-+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }