Check PluginLib version before checking MC version

This commit is contained in:
GeorgH93 2019-04-28 01:58:21 +02:00
parent 6151b08944
commit c53cdfdaf5
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -85,6 +85,14 @@ public static Minepacks getInstance()
public void onEnable() public void onEnable()
{ {
Utils.warnOnJava_1_7(getLogger()); Utils.warnOnJava_1_7(getLogger());
if(PluginLib.getInstance().getVersion().olderThan(new Version("1.0.8-SNAPSHOT")))
{
getLogger().warning("You are using an outdated version of the PCGF PluginLib! Please update it!");
setEnabled(false);
return;
}
//region Check compatibility with used minecraft version //region Check compatibility with used minecraft version
if(MCVersion.is(MCVersion.UNKNOWN) || MCVersion.isNewerThan(MCVersion.MC_NMS_1_14_R1)) if(MCVersion.is(MCVersion.UNKNOWN) || MCVersion.isNewerThan(MCVersion.MC_NMS_1_14_R1))
{ {
@ -96,13 +104,6 @@ public void onEnable()
} }
//endregion //endregion
if(PluginLib.getInstance().getVersion().olderThan(new Version("1.0.8-SNAPSHOT")))
{
getLogger().warning("You are using an outdated version of the PCGF PluginLib! Please update it!");
setEnabled(false);
return;
}
//region check if a plugin folder exists (was renamed from MinePacks to Minepacks with the V2.0 update) //region check if a plugin folder exists (was renamed from MinePacks to Minepacks with the V2.0 update)
if(!getDataFolder().exists()) if(!getDataFolder().exists())
{ {