🧩API

An API is available to you if you want to issue grants using a third-party plugin. But anyway you need to have DrawOnMap plugin on your server.

You need to install the jar into the project: either via local maven or by installing the jar directly into the plugin.

Add plugin name to the plugin.yml to depend or softdepend:

softdepend: [ DrawOnMap ]

Now in the plugin itself you need to get the API. It was divided into several classes.

List of them:

MapIdAPI, CustomUserAPI, CollectionItemAPI, CatalogAPI, EaselAPI, FontAPI, PlacedImageAPI

This is example for MapIdAPI:

if(Bukkit.getPluginManager().getPlugin("DrawOnMap") != null){
    RegisteredServiceProvider<MapIdAPI> rsp = Bukkit.getServicesManager().getRegistration(MapIdAPI.class);
    if (rsp != null) {
        MapIdAPI mapIDAPI = rsp.getProvider();
    }
}

Last updated