--- a/net/minecraft/world/inventory/LecternMenu.java
+++ b/net/minecraft/world/inventory/LecternMenu.java
@@ -14,12 +_,29 @@
     public static final int BUTTON_PAGE_JUMP_RANGE_START = 100;
     private final Container lectern;
     private final ContainerData lecternData;
-
-    public LecternMenu(int containerId) {
-        this(containerId, new SimpleContainer(1), new SimpleContainerData(1));
-    }
-
-    public LecternMenu(int containerId, Container lectern, ContainerData lecternData) {
+    // CraftBukkit start
+    private @javax.annotation.Nullable org.bukkit.craftbukkit.inventory.view.CraftLecternView view = null;
+    private final org.bukkit.entity.Player player;
+
+    @Override
+    public org.bukkit.craftbukkit.inventory.view.CraftLecternView getBukkitView() {
+        if (this.view != null) {
+            return this.view;
+        }
+
+        org.bukkit.craftbukkit.inventory.CraftInventoryLectern inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryLectern(this.lectern);
+        this.view = new org.bukkit.craftbukkit.inventory.view.CraftLecternView(this.player, inventory, this);
+        return this.view;
+    }
+    // CraftBukkit end
+
+    // CraftBukkit start - add player inventory
+    public LecternMenu(int containerId, net.minecraft.world.entity.player.Inventory playerinventory) {
+        this(containerId, new SimpleContainer(1), new SimpleContainerData(1), playerinventory);
+    }
+
+    public LecternMenu(int containerId, Container lectern, ContainerData lecternData, net.minecraft.world.entity.player.Inventory playerinventory) {
+        // CraftBukkit end - add player inventory
         super(MenuType.LECTERN, containerId);
         checkContainerSize(lectern, 1);
         checkContainerDataCount(lecternData, 1);
@@ -33,10 +_,12 @@
             }
         });
         this.addDataSlots(lecternData);
+        this.player = (org.bukkit.entity.Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
     }
 
     @Override
     public boolean clickMenuButton(Player player, int id) {
+        io.papermc.paper.event.player.PlayerLecternPageChangeEvent playerLecternPageChangeEvent; org.bukkit.craftbukkit.inventory.CraftInventoryLectern bukkitView; // Paper - Add PlayerLecternPageChangeEvent
         if (id >= 100) {
             int i = id - 100;
             this.setData(0, i);
@@ -45,12 +_,26 @@
             switch (id) {
                 case 1: {
                     int i = this.lecternData.get(0);
-                    this.setData(0, i - 1);
+                    // Paper start - Add PlayerLecternPageChangeEvent
+                    bukkitView = (org.bukkit.craftbukkit.inventory.CraftInventoryLectern) getBukkitView().getTopInventory();
+                    playerLecternPageChangeEvent = new io.papermc.paper.event.player.PlayerLecternPageChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), bukkitView.getHolder(), bukkitView.getBook(), io.papermc.paper.event.player.PlayerLecternPageChangeEvent.PageChangeDirection.LEFT, i, i - 1);
+                    if (!playerLecternPageChangeEvent.callEvent()) {
+                        return false;
+                    }
+                    this.setData(0, playerLecternPageChangeEvent.getNewPage());
+                    // Paper end - Add PlayerLecternPageChangeEvent
                     return true;
                 }
                 case 2: {
                     int i = this.lecternData.get(0);
-                    this.setData(0, i + 1);
+                    // Paper start - Add PlayerLecternPageChangeEvent
+                    bukkitView = (org.bukkit.craftbukkit.inventory.CraftInventoryLectern) getBukkitView().getTopInventory();
+                    playerLecternPageChangeEvent = new io.papermc.paper.event.player.PlayerLecternPageChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), bukkitView.getHolder(), bukkitView.getBook(), io.papermc.paper.event.player.PlayerLecternPageChangeEvent.PageChangeDirection.RIGHT, i, i + 1);
+                    if (!playerLecternPageChangeEvent.callEvent()) {
+                        return false;
+                    }
+                    this.setData(0, playerLecternPageChangeEvent.getNewPage());
+                    // Paper end - Add PlayerLecternPageChangeEvent
                     return true;
                 }
                 case 3:
@@ -58,6 +_,13 @@
                         return false;
                     }
 
+                    // CraftBukkit start - Event for taking the book
+                    org.bukkit.event.player.PlayerTakeLecternBookEvent event = new org.bukkit.event.player.PlayerTakeLecternBookEvent(this.player, this.getBukkitView().getTopInventory().getHolder());
+                    org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event);
+                    if (event.isCancelled()) {
+                        return false;
+                    }
+                    // CraftBukkit end
                     ItemStack itemStack = this.lectern.removeItemNoUpdate(0);
                     this.lectern.setChanged();
                     if (!player.getInventory().add(itemStack)) {
@@ -84,6 +_,8 @@
 
     @Override
     public boolean stillValid(Player player) {
+        if (this.lectern instanceof net.minecraft.world.level.block.entity.LecternBlockEntity.LecternInventory && !((net.minecraft.world.level.block.entity.LecternBlockEntity.LecternInventory) this.lectern).getLectern().hasBook()) return false; // CraftBukkit
+        if (!this.checkReachable) return true; // CraftBukkit
         return this.lectern.stillValid(player);
     }
 
