9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 23:19:22 +00:00

feat: move HMCC nms methods to Hibiscus Commons

This commit is contained in:
LoJoSho
2023-12-23 12:11:57 -06:00
parent c9398bfb34
commit 583c8e1528
4 changed files with 168 additions and 6 deletions

View File

@@ -17,6 +17,12 @@ public final class HibiscusCommonsPlugin extends HibiscusPlugin {
public void onStart() {
instance = this;
if (!NMSHandlers.isVersionSupported()) {
getLogger().severe("This version is not supported! Consider switching versions?");
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;
@@ -24,12 +30,6 @@ public final class HibiscusCommonsPlugin extends HibiscusPlugin {
//getServer().getPluginManager().registerEvents(new PaperPlayerGameListener(), this);
}
if (!NMSHandlers.isVersionSupported()) {
getLogger().severe("This version is not supported! Consider switching versions?");
getServer().getPluginManager().disablePlugin(this);
return;
}
// Plugin startup logic
Hooks.setup();