9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 04:19:28 +00:00

docs(HookPlaceholderAPI): documented class

This commit is contained in:
Craftinators
2023-03-17 08:58:39 -04:00
parent 2fb28dda32
commit 3f8f84735f

View File

@@ -2,14 +2,20 @@ package com.hibiscusmc.hmccosmetics.hooks.placeholders;
import com.hibiscusmc.hmccosmetics.hooks.Hook;
/**
* A hook that integrates the plugin {@link me.clip.placeholderapi.PlaceholderAPI PlaceholderAPI}
*/
public class HookPlaceholderAPI extends Hook {
public HookPlaceholderAPI() {
super("PlaceholderAPI");
}
/**
* @throws RuntimeException If PlaceholderAPI fails to register
*/
@Override
public void load() {
new HMCPlaceholderExpansion().register();
public void load() throws RuntimeException {
if (!new HMCPlaceholderExpansion().register())
throw new RuntimeException("Failed to register PlaceholderExpansion");
}
}