Add configuration option for disabling books (#275)

FS-458

Co-authored-by: Video <videogamesm12@gmail.com>
Co-authored-by: Paldiu <pawereus@gmail.com>
This commit is contained in:
Allink
2023-02-20 23:39:40 +00:00
committed by GitHub
parent 3bd177ea6f
commit 71127c3152
4 changed files with 14 additions and 1 deletions

View File

@ -171,6 +171,11 @@ public class InteractBlocker extends FreedomService
}
case WRITTEN_BOOK:
{
if (ConfigEntry.ALLOW_BOOKS.getBoolean())
{
break;
}
player.getInventory().clear(player.getInventory().getHeldItemSlot());
player.sendMessage(ChatColor.GRAY + "Books are currently disabled.");
event.setCancelled(true);