aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0121-PlayerElytraBoostEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0121-PlayerElytraBoostEvent.patch')
-rw-r--r--patches/api/0121-PlayerElytraBoostEvent.patch23
1 files changed, 9 insertions, 14 deletions
diff --git a/patches/api/0121-PlayerElytraBoostEvent.patch b/patches/api/0121-PlayerElytraBoostEvent.patch
index fb24f9dbbf..b17cf589ac 100644
--- a/patches/api/0121-PlayerElytraBoostEvent.patch
+++ b/patches/api/0121-PlayerElytraBoostEvent.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] PlayerElytraBoostEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a49cddca5
+index 0000000000000000000000000000000000000000..7d41a5c2dc6ca659bfad41e70cbeac2349c2b0f3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java
-@@ -0,0 +1,104 @@
+@@ -0,0 +1,99 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.entity.Firework;
@@ -20,25 +20,25 @@ index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a
+import org.bukkit.inventory.EquipmentSlot;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
+/**
+ * Fired when a player boosts elytra flight with a firework
+ */
++@NullMarked
+public class PlayerElytraBoostEvent extends PlayerEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
-+ @NotNull private final ItemStack itemStack;
-+ @NotNull private final Firework firework;
++ private final ItemStack itemStack;
++ private final Firework firework;
+ private boolean consume = true;
-+ @NotNull
+ private final EquipmentSlot hand;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public PlayerElytraBoostEvent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull Firework firework, @NotNull EquipmentSlot hand) {
++ public PlayerElytraBoostEvent(final Player player, final ItemStack itemStack, final Firework firework, final EquipmentSlot hand) {
+ super(player);
+ this.itemStack = itemStack;
+ this.firework = firework;
@@ -50,7 +50,6 @@ index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a
+ *
+ * @return ItemStack of firework
+ */
-+ @NotNull
+ public ItemStack getItemStack() {
+ return this.itemStack;
+ }
@@ -60,7 +59,6 @@ index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a
+ *
+ * @return Firework entity
+ */
-+ @NotNull
+ public Firework getFirework() {
+ return this.firework;
+ }
@@ -79,7 +77,7 @@ index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a
+ *
+ * @param consume {@code true} to consume
+ */
-+ public void setShouldConsume(boolean consume) {
++ public void setShouldConsume(final boolean consume) {
+ this.consume = consume;
+ }
+
@@ -88,7 +86,6 @@ index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a
+ *
+ * @return interaction hand
+ */
-+ @NotNull
+ public EquipmentSlot getHand() {
+ return this.hand;
+ }
@@ -99,17 +96,15 @@ index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a
+ }
+
+ @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;
+ }