Add the plugin as a dependency:
RocketPlaceholdersAPI api = Bukkit.getServicesManager().load(RocketPlaceholdersAPI.class);
if (api != null) {
this.getLogger().info("RocketPlaceholders hooked!");
} else {
this.getLogger().severe("Unable to find RocketPlaceholdersAPI, disabling..");
this.getServer().getPluginManager().disablePlugin(this);
}
How to add a placeholders
Without permissions nodes
this.getAPI().addPlaceholder(new PlaceholderBuilder("identifier", "text"));
this.api.addPlaceholder(new PlaceholderBuilder(new PlaceholderBuilder("identifier", "text").createPermissionNode("permission.example", "secret text"));
How to get all placeholders
this.getAPI().getInternalPlaceholders().getStorageManager().getInternalPlaceholders();
this.getAPI().getInternalPlaceholders().getStorageManager().getExternalPlaceholders().getHashMap();