From 3c6c2837bde81ba3d4cf49ba80192094f531a75d Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 25 May 2014 22:46:35 +0200 Subject: [PATCH] Check permission before sending anvil messages --- src/main/java/com/gmail/nossr50/listeners/BlockListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 9e6430bf7..9802de1b5 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -125,10 +125,10 @@ public class BlockListener implements Listener { McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); - if (blockState.getType() == Repair.anvilMaterial) { + if (blockState.getType() == Repair.anvilMaterial && SkillType.REPAIR.getPermissions(player)) { mcMMOPlayer.getRepairManager().placedAnvilCheck(); } - else if (blockState.getType() == Salvage.anvilMaterial) { + else if (blockState.getType() == Salvage.anvilMaterial && SkillType.SALVAGE.getPermissions(player)) { mcMMOPlayer.getSalvageManager().placedAnvilCheck(); } }