From 3f8f84735fd5532d78ab9a86178c26b779568919 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Fri, 17 Mar 2023 08:58:39 -0400 Subject: [PATCH] docs(HookPlaceholderAPI): documented class --- .../hooks/placeholders/HookPlaceholderAPI.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/placeholders/HookPlaceholderAPI.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/placeholders/HookPlaceholderAPI.java index 00606171..6c92ae26 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/placeholders/HookPlaceholderAPI.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/placeholders/HookPlaceholderAPI.java @@ -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"); } }