mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
[ci skip] Cleanup events (#10202)
This commit is contained in:
@@ -18,20 +18,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public class PlayerLecternPageChangeEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+ private final Lectern lectern;
|
||||
+ private final ItemStack book;
|
||||
+ private final PageChangeDirection pageChangeDirection;
|
||||
+ private final int oldPage;
|
||||
+ private int newPage;
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerLecternPageChangeEvent(@NotNull Player player, @NotNull Lectern lectern, @NotNull ItemStack book, @NotNull PageChangeDirection pageChangeDirection, int oldPage, int newPage) {
|
||||
+ super(player);
|
||||
+ this.lectern = lectern;
|
||||
@@ -48,7 +50,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Lectern getLectern() {
|
||||
+ return lectern;
|
||||
+ return this.lectern;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -68,7 +70,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public PageChangeDirection getPageChangeDirection() {
|
||||
+ return pageChangeDirection;
|
||||
+ return this.pageChangeDirection;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -77,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the page changed from
|
||||
+ */
|
||||
+ public int getOldPage() {
|
||||
+ return oldPage;
|
||||
+ return this.oldPage;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -86,7 +88,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the page changed to
|
||||
+ */
|
||||
+ public int getNewPage() {
|
||||
+ return newPage;
|
||||
+ return this.newPage;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -101,7 +103,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
Reference in New Issue
Block a user