From 67042106d535a59a66e990e3d9cf32752a9b8603 Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Fri, 17 Jan 2025 13:30:57 -0600 Subject: [PATCH] feat: check for Paper before attempting to get NMS classes --- .../hibiscuscommons/HibiscusCommonsPlugin.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/me/lojosho/hibiscuscommons/HibiscusCommonsPlugin.java b/common/src/main/java/me/lojosho/hibiscuscommons/HibiscusCommonsPlugin.java index 22bcae2..cc15c94 100644 --- a/common/src/main/java/me/lojosho/hibiscuscommons/HibiscusCommonsPlugin.java +++ b/common/src/main/java/me/lojosho/hibiscuscommons/HibiscusCommonsPlugin.java @@ -20,13 +20,6 @@ public final class HibiscusCommonsPlugin extends HibiscusPlugin { public void onStart() { instance = this; - try { - NMSHandlers.setup(); - } catch (RuntimeException e) { - getServer().getPluginManager().disablePlugin(this); - return; - } - // Detects if a user is running a paper server if (ServerUtils.hasClass("com.destroystokyo.paper.PaperConfig") || ServerUtils.hasClass("io.papermc.paper.configuration.Configuration")) { onPaper = true; @@ -38,6 +31,13 @@ public final class HibiscusCommonsPlugin extends HibiscusPlugin { getLogger().warning("Download Paper at: https://papermc.io/"); } + try { + NMSHandlers.setup(); + } catch (RuntimeException e) { + getServer().getPluginManager().disablePlugin(this); + return; + } + // Plugin startup logic Hooks.setup();