2012-02-16 19:09:37 +01:00
|
|
|
package com.Acrobot.ChestShop.Protection.Plugins;
|
|
|
|
|
|
|
|
import com.Acrobot.ChestShop.Protection.Protection;
|
|
|
|
import com.webkonsept.bukkit.simplechestlock.SCL;
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Acrobot
|
|
|
|
*/
|
|
|
|
public class SCLplugin implements Protection {
|
2012-04-19 15:50:53 +02:00
|
|
|
public SCL scl;
|
|
|
|
|
|
|
|
public SCLplugin(SCL scl) {
|
|
|
|
this.scl = scl;
|
|
|
|
}
|
2012-02-16 19:09:37 +01:00
|
|
|
|
|
|
|
public boolean isProtected(Block block) {
|
|
|
|
return scl.chests.isLocked(block);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean canAccess(Player player, Block block) {
|
|
|
|
return scl.chests.getOwner(block).equalsIgnoreCase(player.getName());
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean protect(String name, Block block) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|