2011-05-15 19:33:03 +02:00
|
|
|
package com.Acrobot.ChestShop.Protection;
|
2011-05-15 18:16:25 +02:00
|
|
|
|
|
|
|
import com.griefcraft.lwc.LWC;
|
|
|
|
import com.griefcraft.model.ProtectionTypes;
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Acrobot
|
|
|
|
*/
|
2011-05-29 13:25:25 +02:00
|
|
|
public class LWCplugin implements Protection {
|
2011-05-15 18:16:25 +02:00
|
|
|
public static LWC lwc;
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isProtected(Block block) {
|
|
|
|
return lwc.findProtection(block) != null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean canAccess(Player player, Block block) {
|
|
|
|
return lwc.canAccessProtection(player, block);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean protect(String name, Block block) {
|
|
|
|
lwc.getPhysicalDatabase().registerProtection(block.getTypeId(), ProtectionTypes.PRIVATE, block.getWorld().getName(), name, "", block.getX(), block.getY(), block.getZ());
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|