aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0077-ExperienceOrb-merging-stacking-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0077-ExperienceOrb-merging-stacking-API.patch')
-rw-r--r--patches/api/0077-ExperienceOrb-merging-stacking-API.patch19
1 files changed, 8 insertions, 11 deletions
diff --git a/patches/api/0077-ExperienceOrb-merging-stacking-API.patch b/patches/api/0077-ExperienceOrb-merging-stacking-API.patch
index 88367f383e..aab6f1a751 100644
--- a/patches/api/0077-ExperienceOrb-merging-stacking-API.patch
+++ b/patches/api/0077-ExperienceOrb-merging-stacking-API.patch
@@ -12,10 +12,10 @@ Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6bfb76ad3
+index 0000000000000000000000000000000000000000..5902e6d6c0516a1249c72b405a49dfc5cc490e0e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java
-@@ -0,0 +1,91 @@
+@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License
+ *
@@ -46,22 +46,23 @@ index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6
+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;
+
+/**
+ * Fired anytime the server is about to merge 2 experience orbs into one
+ */
++@NullMarked
+public class ExperienceOrbMergeEvent extends EntityEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
-+ @NotNull private final ExperienceOrb mergeTarget;
-+ @NotNull private final ExperienceOrb mergeSource;
++ private final ExperienceOrb mergeTarget;
++ private final ExperienceOrb mergeSource;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public ExperienceOrbMergeEvent(@NotNull ExperienceOrb mergeTarget, @NotNull ExperienceOrb mergeSource) {
++ public ExperienceOrbMergeEvent(final ExperienceOrb mergeTarget, final ExperienceOrb mergeSource) {
+ super(mergeTarget);
+ this.mergeTarget = mergeTarget;
+ this.mergeSource = mergeSource;
@@ -70,7 +71,6 @@ index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6
+ /**
+ * @return The orb that will absorb the other experience orb
+ */
-+ @NotNull
+ public ExperienceOrb getMergeTarget() {
+ return this.mergeTarget;
+ }
@@ -78,7 +78,6 @@ index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6
+ /**
+ * @return The orb that is subject to being removed and merged into the target orb
+ */
-+ @NotNull
+ public ExperienceOrb getMergeSource() {
+ return this.mergeSource;
+ }
@@ -92,17 +91,15 @@ index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6
+ * @param cancel {@code true} if you wish to cancel this event, and prevent the orbs from merging
+ */
+ @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;
+ }