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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user