Improve startup checks for invalid settings

This commit is contained in:
libraryaddict
2019-06-29 13:38:20 +12:00
parent 5e1ed00434
commit fd2f7e4fbc
4 changed files with 155 additions and 55 deletions

View File

@@ -53,7 +53,7 @@ public class LibsDisguises extends JavaPlugin {
getLogger().info("Build Date: " + pluginYml.getString("build-date"));
LibsPremium.check(getDescription().getVersion());
LibsPremium.check(getDescription().getVersion(), getFile());
if (!LibsPremium.isPremium()) {
getLogger().severe("You must purchase the plugin to use support for 1.14!");
@@ -243,6 +243,14 @@ public class LibsDisguises extends JavaPlugin {
continue;
}
// Invalidate invalid distribution
if (LibsPremium.isPremium() && LibsPremium.getPaidInformation() != null &&
LibsPremium.getPaidInformation().getDownloadID().equals("-1895736039")) {
throw new IllegalStateException(
"Error while checking pi rate on startup! Please re-download the jar from SpigotMC before " +
"reporting this error!");
}
disguiseType.setWatcherClass(watcherClass);
if (DisguiseValues.getDisguiseValues(disguiseType) != null) {