package com.elmakers.mine.bukkit.api.protection;

import javax.annotation.Nullable;

import org.bukkit.Location;
import org.bukkit.entity.Player;

import com.elmakers.mine.bukkit.api.spell.SpellTemplate;

public interface CastPermissionManager {
    /**
     * This will perform cast permission checks for a specific location.
     */
    @Nullable
    default Boolean getRegionCastPermission(Player player, SpellTemplate spell, Location location) {
        return null;
    }

    /**
     * This will perform cast permission checks for a specific location.
     * This will override the region permission, and is generally for use inside of a player's
     * personal protected area, when it may be contained within a larger globally protected area.
     */
    @Nullable
    default Boolean getPersonalCastPermission(Player player, SpellTemplate spell, Location location) {
        return null;
    }
}

@@ -316,24 +316,232 @@
 c location.%0A
+     *%0A     * @return false to deny cast permission, null to not care. Returning true means the cast will be allowed,%0A     *     including breaking/building blocks, even if it otherwise would not be allowed.%0A
      */%0A    
@@ -953,16 +953,224 @@
 d area.%0A
+     *%0A     * @return false to deny cast permission, null to not care. Returning true means the cast will be allowed,%0A     *     including breaking/building blocks, even if it otherwise would not be allowed.%0A
      */%0A

Add some docs to the return values of CastPermissionManager