mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
Allow skipping version check per request
This commit is contained in:
parent
9c986aa25f
commit
3896bcbd64
1 changed files with 8 additions and 5 deletions
|
@ -153,11 +153,14 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
|||
execTimer.mark("I18n1");
|
||||
|
||||
Console.setInstance(this);
|
||||
|
||||
String serverString = Bukkit.getServer().getClass().getName();
|
||||
for (int i = 1; i <= 7; i++) {
|
||||
if (serverString.contains(".v1_" + i + "_R")) {
|
||||
throw new Error("Outdated server. This version of Essentials will only work on Bukkit 1.8 or higher.");
|
||||
|
||||
File file = new File(getDataFolder(), ".skipversion");
|
||||
if (!file.exists()) {
|
||||
String serverString = Bukkit.getServer().getClass().getName();
|
||||
for (int i = 1; i <= 7; i++) {
|
||||
if (serverString.contains(".v1_" + i + "_R")) {
|
||||
throw new Error("Outdated server. This version of Essentials will only work on Bukkit 1.8 or higher.");
|
||||
}
|
||||
}
|
||||
}
|
||||
final PluginManager pm = getServer().getPluginManager();
|
||||
|
|
Loading…
Reference in a new issue