mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 10:35:15 +01:00
Instead of generating a new protection, use the new method
This commit is contained in:
parent
bb9f970148
commit
7f8fe5e6c1
@ -42,7 +42,7 @@ public class playerInteract implements Listener {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (Config.getBoolean(Property.USE_BUILT_IN_PROTECTION) && block.getType() == Material.CHEST) {
|
||||
Default protection = new Default();
|
||||
Default protection = Security.getDefaultProtection();
|
||||
if (!hasAdminPermissions(player) && (protection.isProtected(block) && !protection.canAccess(player, block))) {
|
||||
player.sendMessage(Config.getLocal(Language.ACCESS_DENIED));
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user