Do not download new version of plugin on old CraftBukkit versions

This commit is contained in:
Andrzej Pomirski 2014-06-01 21:12:49 +02:00 committed by Your Name
parent 574953375d
commit a9f9c4adf9
1 changed files with 11 additions and 1 deletions

View File

@ -287,7 +287,17 @@ public class ChestShop extends JavaPlugin {
return;
}
new Updater(this, PROJECT_BUKKITDEV_ID, this.getFile(), Updater.UpdateType.DEFAULT, true);
Updater updater = new Updater(this, PROJECT_BUKKITDEV_ID, this.getFile(), Updater.UpdateType.NO_DOWNLOAD, true);
if (updater.getResult() == Updater.UpdateResult.UPDATE_AVAILABLE) {
if (Bukkit.getBukkitVersion().contains("1.7.2") || Bukkit.getBukkitVersion().contains("1.7.5")) {
for (int i = 0; i < 3; ++i) {
logger.warning("There is a new version of ChestShop available, however it is only compatible with Minecraft 1.7.8 and higher!");
}
} else {
new Updater(this, PROJECT_BUKKITDEV_ID, this.getFile(), Updater.UpdateType.NO_VERSION_CHECK, true);
}
}
}
///////////////////// DATABASE STUFF ////////////////////////////////