diff options
Diffstat (limited to 'patches/api/0233-Added-PlayerLoomPatternSelectEvent.patch')
-rw-r--r-- | patches/api/0233-Added-PlayerLoomPatternSelectEvent.patch | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/patches/api/0233-Added-PlayerLoomPatternSelectEvent.patch b/patches/api/0233-Added-PlayerLoomPatternSelectEvent.patch index 766e838ec8..e5f19ed926 100644 --- a/patches/api/0233-Added-PlayerLoomPatternSelectEvent.patch +++ b/patches/api/0233-Added-PlayerLoomPatternSelectEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Added PlayerLoomPatternSelectEvent diff --git a/src/main/java/io/papermc/paper/event/player/PlayerLoomPatternSelectEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerLoomPatternSelectEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c35d7411f6 +index 0000000000000000000000000000000000000000..5d4a334ba97cc0c17db8a157f2e2fd99dafbdbcc --- /dev/null +++ b/src/main/java/io/papermc/paper/event/player/PlayerLoomPatternSelectEvent.java -@@ -0,0 +1,80 @@ +@@ -0,0 +1,77 @@ +package io.papermc.paper.event.player; + +import org.bukkit.block.banner.PatternType; @@ -19,11 +19,12 @@ index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c3 +import org.bukkit.event.player.PlayerEvent; +import org.bukkit.inventory.LoomInventory; +import org.jetbrains.annotations.ApiStatus; -+import org.jetbrains.annotations.NotNull; ++import org.jspecify.annotations.NullMarked; + +/** + * Called when a player selects a banner patten in a loom inventory. + */ ++@NullMarked +public class PlayerLoomPatternSelectEvent extends PlayerEvent implements Cancellable { + + private static final HandlerList HANDLER_LIST = new HandlerList(); @@ -34,7 +35,7 @@ index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c3 + private boolean cancelled; + + @ApiStatus.Internal -+ public PlayerLoomPatternSelectEvent(@NotNull Player player, @NotNull LoomInventory loomInventory, @NotNull PatternType patternType) { ++ public PlayerLoomPatternSelectEvent(final Player player, final LoomInventory loomInventory, final PatternType patternType) { + super(player); + this.loomInventory = loomInventory; + this.patternType = patternType; @@ -45,7 +46,6 @@ index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c3 + * + * @return the loom inventory + */ -+ @NotNull + public LoomInventory getLoomInventory() { + return this.loomInventory; + } @@ -55,7 +55,6 @@ index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c3 + * + * @return the pattern type + */ -+ @NotNull + public PatternType getPatternType() { + return this.patternType; + } @@ -65,7 +64,7 @@ index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c3 + * + * @param patternType the pattern type + */ -+ public void setPatternType(@NotNull PatternType patternType) { ++ public void setPatternType(final PatternType patternType) { + this.patternType = patternType; + } + @@ -75,17 +74,15 @@ index 0000000000000000000000000000000000000000..c614bd1a725adee0c434a9331099d0c3 + } + + @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; + } |