Skip to content

Commit

Permalink
Cancel interact event if book has been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ds58 committed Feb 18, 2023
1 parent 515490c commit 29d17d5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void onBookInteract(PlayerInteractEvent event) {

if (bvConfig.removeBookIfUnsigned) {
player.getInventory().removeItem(itemStack);
event.setCancelled(true);
}

return;
Expand All @@ -143,6 +144,7 @@ public void onBookInteract(PlayerInteractEvent event) {

if (bvConfig.removeBookIfForged) {
player.getInventory().removeItem(itemStack);
event.setCancelled(true);
}
}
}
Expand Down

0 comments on commit 29d17d5

Please sign in to comment.