Disable the plugin if storage migration is not possible.
This commit is contained in:
parent
d28bedb78e
commit
1e9b9905a5
@ -18,11 +18,13 @@ package de.craftinc.gates.persistence;
|
|||||||
|
|
||||||
import de.craftinc.gates.Gate;
|
import de.craftinc.gates.Gate;
|
||||||
|
|
||||||
|
import de.craftinc.gates.Plugin;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
|
||||||
public class MigrationUtil
|
public class MigrationUtil
|
||||||
@ -43,7 +45,8 @@ public class MigrationUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user