Throw an exception when the gates got stored with a newer version.
This commit is contained in:
parent
8e860e90c6
commit
95446f1371
@ -102,6 +102,10 @@ public class GatesManager
|
||||
// migration
|
||||
int fileStorageVersion = gatesConfig.getInt(storageVersionPath);
|
||||
|
||||
if (fileStorageVersion > storageVersion) {
|
||||
throw new RuntimeException("Unsupported storage version detected! Make sure you have the latest version of Craft Inc. Gates installed.");
|
||||
}
|
||||
|
||||
if (fileStorageVersion < storageVersion) {
|
||||
Plugin.log("Outdated storage version detected. Performing data migration...");
|
||||
MigrationUtil.performMigration(fileStorageVersion, storageVersion, this.gates);
|
||||
|
Loading…
x
Reference in New Issue
Block a user