diff options
Diffstat (limited to 'patches/api/0232-Added-PlayerLecternPageChangeEvent.patch')
-rw-r--r-- | patches/api/0232-Added-PlayerLecternPageChangeEvent.patch | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/patches/api/0232-Added-PlayerLecternPageChangeEvent.patch b/patches/api/0232-Added-PlayerLecternPageChangeEvent.patch index 3c9f223aa5..43e273dba1 100644 --- a/patches/api/0232-Added-PlayerLecternPageChangeEvent.patch +++ b/patches/api/0232-Added-PlayerLecternPageChangeEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Added PlayerLecternPageChangeEvent diff --git a/src/main/java/io/papermc/paper/event/player/PlayerLecternPageChangeEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerLecternPageChangeEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b8112a98bb3 +index 0000000000000000000000000000000000000000..6126182db48dab1286924f9642fb259087efabb3 --- /dev/null +++ b/src/main/java/io/papermc/paper/event/player/PlayerLecternPageChangeEvent.java -@@ -0,0 +1,117 @@ +@@ -0,0 +1,113 @@ +package io.papermc.paper.event.player; + +import org.bukkit.block.Lectern; @@ -19,8 +19,9 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 +import org.bukkit.event.player.PlayerEvent; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.ApiStatus; -+import org.jetbrains.annotations.NotNull; ++import org.jspecify.annotations.NullMarked; + ++@NullMarked +public class PlayerLecternPageChangeEvent extends PlayerEvent implements Cancellable { + + private static final HandlerList HANDLER_LIST = new HandlerList(); @@ -34,7 +35,7 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 + private boolean cancelled; + + @ApiStatus.Internal -+ public PlayerLecternPageChangeEvent(@NotNull Player player, @NotNull Lectern lectern, @NotNull ItemStack book, @NotNull PageChangeDirection pageChangeDirection, int oldPage, int newPage) { ++ public PlayerLecternPageChangeEvent(final Player player, final Lectern lectern, final ItemStack book, final PageChangeDirection pageChangeDirection, final int oldPage, final int newPage) { + super(player); + this.lectern = lectern; + this.book = book; @@ -48,7 +49,6 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 + * + * @return the Lectern + */ -+ @NotNull + public Lectern getLectern() { + return this.lectern; + } @@ -58,7 +58,6 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 + * + * @return the ItemStack on the Lectern + */ -+ @NotNull + public ItemStack getBook() { + return this.book; + } @@ -68,7 +67,6 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 + * + * @return the page change direction + */ -+ @NotNull + public PageChangeDirection getPageChangeDirection() { + return this.pageChangeDirection; + } @@ -97,7 +95,7 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 + * + * @param newPage the new paged changed to + */ -+ public void setNewPage(int newPage) { ++ public void setNewPage(final int newPage) { + this.newPage = newPage; + } + @@ -107,17 +105,15 @@ index 0000000000000000000000000000000000000000..6ed2a6c8c033937d933b6d4834953b81 + } + + @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; + } |