Disable the plugin if storage migration is not possible.

This commit is contained in:
Tobias Ottenweller 2013-06-20 19:19:00 +02:00
parent d28bedb78e
commit 1e9b9905a5

View File

@ -18,11 +18,13 @@ package de.craftinc.gates.persistence;
import de.craftinc.gates.Gate;
import de.craftinc.gates.Plugin;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import java.util.List;
import java.util.logging.Level;
public class MigrationUtil
@ -43,7 +45,8 @@ public class MigrationUtil
}
}
else {
throw new IllegalArgumentException("Supplied storage version is currently not supported! Make sure you have the latest version of Craft Inc. Gates installed.");
Plugin.log(Level.SEVERE, "Supplied storage version is currently not supported! Make sure you have the latest version of Craft Inc. Gates installed. Plugin will be disabled!");
Plugin.getPlugin().getServer().getPluginManager().disablePlugin(Plugin.getPlugin());
}
}
}