Skip to content
Mirai edited this page Nov 11, 2024 · 8 revisions

API usage

When the plugin is enabled, an instance of LuckPerms will be provided in the Bukkit ServicesManager:

RegisteredServiceProvider<WorldGuardRegionProtect> provider = Bukkit.getServicesManager().getRegistration(WorldGuardRegionProtect.class);
if (provider != null) {
    WorldGuardRegionProtect api = provider.getProvider();
}

or get instance api from plugin provider:

WorldGuardRegionProtect provider = WorldGuardRegionProtectProvider.get();

examples use api of [WorldGuardRegionProtect you can seen here](https://github.com/[RSTeamCore/WGRPAddonExample](https://github.com/RSTeamCore/WGRPAddonExample).

Clone this wiki locally