diff options
Diffstat (limited to 'patches/api/0281-Add-PufferFishStateChangeEvent.patch')
-rw-r--r-- | patches/api/0281-Add-PufferFishStateChangeEvent.patch | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/patches/api/0281-Add-PufferFishStateChangeEvent.patch b/patches/api/0281-Add-PufferFishStateChangeEvent.patch index 7a719777e3..30808a75a1 100644 --- a/patches/api/0281-Add-PufferFishStateChangeEvent.patch +++ b/patches/api/0281-Add-PufferFishStateChangeEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add PufferFishStateChangeEvent diff --git a/src/main/java/io/papermc/paper/event/entity/PufferFishStateChangeEvent.java b/src/main/java/io/papermc/paper/event/entity/PufferFishStateChangeEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..4e04b49c1e2bc2a965c9be2388539d9ed5a58f89 +index 0000000000000000000000000000000000000000..b4521d64eefd8f871f8ce78734e6626896e8b0d0 --- /dev/null +++ b/src/main/java/io/papermc/paper/event/entity/PufferFishStateChangeEvent.java -@@ -0,0 +1,87 @@ +@@ -0,0 +1,85 @@ +package io.papermc.paper.event.entity; + +import org.bukkit.entity.PufferFish; @@ -17,11 +17,12 @@ index 0000000000000000000000000000000000000000..4e04b49c1e2bc2a965c9be2388539d9e +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; + +/** + * Called just before a {@link PufferFish} inflates or deflates. + */ ++@NullMarked +public class PufferFishStateChangeEvent extends EntityEvent implements Cancellable { + + private static final HandlerList HANDLER_LIST = new HandlerList(); @@ -30,12 +31,11 @@ index 0000000000000000000000000000000000000000..4e04b49c1e2bc2a965c9be2388539d9e + private boolean cancelled; + + @ApiStatus.Internal -+ public PufferFishStateChangeEvent(@NotNull PufferFish entity, int newPuffState) { ++ public PufferFishStateChangeEvent(final PufferFish entity, final int newPuffState) { + super(entity); + this.newPuffState = newPuffState; + } + -+ @NotNull + @Override + public PufferFish getEntity() { + return (PufferFish) super.getEntity(); @@ -77,7 +77,7 @@ index 0000000000000000000000000000000000000000..4e04b49c1e2bc2a965c9be2388539d9e + * @param cancel {@code true} if you wish to cancel the (in/de)flation + */ + @Override -+ public void setCancelled(boolean cancel) { ++ public void setCancelled(final boolean cancel) { + this.cancelled = cancel; + } + @@ -86,13 +86,11 @@ index 0000000000000000000000000000000000000000..4e04b49c1e2bc2a965c9be2388539d9e + return this.cancelled; + } + -+ @NotNull + @Override + public HandlerList getHandlers() { + return HANDLER_LIST; + } + -+ @NotNull + public static HandlerList getHandlerList() { + return HANDLER_LIST; + } |