Instead of generating a new protection, use the new method

This commit is contained in:
Acrobot 2012-04-19 16:37:33 +02:00
parent bb9f970148
commit 7f8fe5e6c1
1 changed files with 1 additions and 1 deletions

View File

@ -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);