mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-20 22:01:20 +01:00
Fix ProtectionCheckEvent not being used when accessing shop
This commit is contained in:
parent
b300798a62
commit
a95f7316d6
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user