From cc03fdcba88bec760a5e10961748dbce248bfec7 Mon Sep 17 00:00:00 2001 From: Shane Bee Date: Sun, 8 Sep 2019 11:50:28 -0700 Subject: [PATCH] Fix lectern permissions for spigot servers - Fixes an issue with players with correct trust level not able to put a book in a lectern when the server is running Spigot - This "fix" isn't needed for Paper... Closes #613 --- .../java/me/ryanhamshire/GriefPrevention/BlockEventHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/main/java/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index cc87a66..ea7d156 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -243,7 +243,7 @@ public class BlockEventHandler implements Listener // Allow players with container trust to place books in lecterns PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId()); Claim claim = this.dataStore.getClaimAt(block.getLocation(), true, playerData.lastClaim); - if (block.getType() == Material.LECTERN && placeEvent.getBlockReplacedState() instanceof Lectern) + if (block.getType() == Material.LECTERN && placeEvent.getBlockReplacedState().getType() == Material.LECTERN) { if (claim != null) {