mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-23 00:49:27 +00:00
feat: move HMCC nms methods to Hibiscus Commons
This commit is contained in:
@@ -3,7 +3,10 @@ package me.lojosho.hibiscuscommons;
|
||||
import com.jeff_media.updatechecker.UpdateCheckSource;
|
||||
import com.jeff_media.updatechecker.UpdateChecker;
|
||||
import lombok.Getter;
|
||||
import me.lojosho.hibiscuscommons.nms.NMSHandlers;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public abstract class HibiscusPlugin extends JavaPlugin {
|
||||
@@ -36,6 +39,15 @@ public abstract class HibiscusPlugin extends JavaPlugin {
|
||||
public final void onEnable() {
|
||||
super.onEnable();
|
||||
|
||||
Plugin hibiscusCommons = Bukkit.getPluginManager().getPlugin("HibiscusCommons");
|
||||
if (hibiscusCommons == null || !hibiscusCommons.isEnabled()) {
|
||||
getLogger().severe("");
|
||||
getLogger().severe("HibiscusCommons is required to be enabled to run this plugin!");
|
||||
getLogger().severe("");
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bstats > 0) {
|
||||
Metrics metrics = new Metrics(this, bstats);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user