registerProtectionProvider

public static void registerProtectionProvider(String providerName, Predicate<Location> predicate)

Registers a region-protection predicate. A location is reported as protected whenever any registered predicate returns true for it. Registering again under the same provider name replaces the earlier predicate.

Parameters

providerName

short identifier for logging, diagnostics and replacement; a null name can be neither replaced nor unregistered

predicate

returns true if the location is inside a protected region