Allow vanilla block interaction with sneak if the block is set to be a mcMMO repair/salvage anvil

This commit is contained in:
nossr50
2020-12-29 12:58:39 -08:00
parent d9f98b1aa9
commit 3c9c8556dd
2 changed files with 4 additions and 2 deletions

View File

@ -616,8 +616,8 @@ public class PlayerListener implements Listener {
if(clickedBlockType == Repair.anvilMaterial || clickedBlockType == Salvage.anvilMaterial) {
event.setUseItemInHand(Event.Result.ALLOW);
if(mcMMO.getMaterialMapStore().isToolActivationBlackListed(clickedBlockType)) {
event.setUseInteractedBlock(Event.Result.DENY);
if(!event.getPlayer().isSneaking() && mcMMO.getMaterialMapStore().isToolActivationBlackListed(clickedBlockType)) {
event.setUseInteractedBlock(Event.Result.DENY);
}
}