TheNextLvlTheNextLvl

API

Services and core entry points of the Protect API

GitHub Edit on GitHub

API Overview

Protect exposes service-based APIs through Bukkit's ServicesManager.
You can query protection checks, manage areas, and work with custom flags.

Available Services

  • ProtectionService - granular access control (canPlace, canDestroy, canInteract, canEnter, canLeave, ...)
  • AreaProvider - area lookup by world, location, entity, or name
  • AreaService - create/delete regionized areas and register wrappers/adapters
  • FlagRegistry - register and query custom flags

Access a Service

Use ServiceManager#load to access a service.

ProtectionService service = Bukkit.getServicesManager().load(ProtectionService.class);
if (service != null) {
    boolean canBuild = service.canPlace(player, location);
}

Events

Protect emits extensive Bukkit events for area lifecycle, flag changes, members/ownership, player transitions, region updates, and schematics.

See Events for the complete event reference.

Last updated on

On this page