Added bag support

This commit is contained in:
0ft3n
2021-08-04 21:59:07 +03:00
committed by GitHub
parent a93b590c16
commit 5e1c6771c7

View File

@@ -28,6 +28,12 @@ public class TalismansPlugin extends EcoPlugin {
@Getter
private static TalismansPlugin instance;
/**
* If bag from TalismansGUI plugin is used or not.
*/
@Getter
private static boolean bagLoaded;
/**
* Internal constructor called by bukkit on plugin load.
*/
@@ -38,6 +44,14 @@ public class TalismansPlugin extends EcoPlugin {
@Override
protected void handleEnable() {
if (this.getServer().getPluginManager().getPlugin("TalismansGUI") != null){
bagLoaded = this.getServer().getPluginManager().getPlugin("TalismansGUI").getDescription().getVersion().compareTo("1.3") >= 0;
}
else {
bagLoaded = false;
}
this.getLogger().info(Talismans.values().size() + " Talismans Loaded");
}