Fix ProtectionCheckEvent not being used when accessing shop

This commit is contained in:
Phoenix616 2019-05-07 16:13:56 +01:00
parent b300798a62
commit a95f7316d6
2 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,6 @@ import com.Acrobot.ChestShop.Events.ItemParseEvent;
import com.Acrobot.ChestShop.Events.PreTransactionEvent;
import com.Acrobot.ChestShop.Events.TransactionEvent;
import com.Acrobot.ChestShop.Permission;
import com.Acrobot.ChestShop.Plugins.ChestShop;
import com.Acrobot.ChestShop.Security;
import com.Acrobot.ChestShop.Signs.ChestShopSign;
import com.Acrobot.ChestShop.Utils.uBlock;
@ -67,7 +66,7 @@ public class PlayerInteract implements Listener {
return;
}
if (!ChestShop.canAccess(player, block)) {
if (!Security.canAccess(player, block)) {
player.sendMessage(Messages.prefix(Messages.ACCESS_DENIED));
event.setCancelled(true);
}

View File

@ -2,7 +2,7 @@ package com.Acrobot.ChestShop.Listeners.Player;
import com.Acrobot.ChestShop.Configuration.Messages;
import com.Acrobot.ChestShop.Configuration.Properties;
import com.Acrobot.ChestShop.Plugins.ChestShop;
import com.Acrobot.ChestShop.Security;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
@ -43,7 +43,7 @@ public class PlayerInventory implements Listener {
chest = ((DoubleChest) event.getInventory().getHolder()).getLocation().getBlock();
}
if (!ChestShop.canAccess(player, chest)) {
if (!Security.canAccess(player, chest)) {
player.sendMessage(Messages.prefix(Messages.ACCESS_DENIED));
event.setCancelled(true);
}