public final class BeaconPlacePermission implements Listener {
private static IslandPrivilege BEACON_BREAK;
public void onPluginInit(PluginInitializeEvent e){
IslandPrivilege.register("BEACON_BREAK");
BEACON_BREAK = IslandPrivilege.getByName("BEACON_BREAK");
public void onBlockBreak(BlockBreakEvent e){
//Checking for beacons only.
if(e.getBlock().getType() != Material.BEACON)
Island island = SuperiorSkyblockAPI.getIslandAt(e.getBlock().getLocation());
// Making sure the block was broken inside an island.
if(!island.hasPermission(e.getPlayer(), BEACON_BREAK)){
e.getPlayer().sendMessage("" + ChatColor.RED + ChatColor.BOLD + "Error | " + ChatColor.GRAY + "This island is protected.");