9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-27 10:59:14 +00:00

Fixed ModelEngine being used when not present

This commit is contained in:
LoJoSho
2023-02-01 15:27:30 -06:00
parent 4b1c15f46f
commit 645fd25b82
3 changed files with 15 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
private static boolean disable = false;
private static YamlConfigurationLoader configLoader;
private static final int pluginId = 13873;
private static boolean hasModelEngine = false;
@Override
public void onEnable() {
@@ -92,6 +93,13 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
new PAPIHook().register();
}
// ModelEngine
if (Bukkit.getPluginManager().getPlugin("ModelEngine") != null) {
hasModelEngine = true;
}
// WorldGuard
if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) {
getServer().getPluginManager().registerEvents(new WGListener(), this);
}
@@ -229,4 +237,8 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
throw new RuntimeException(e);
}
}
public static boolean hasModelEngine() {
return hasModelEngine;
}
}