mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +01:00
Merge pull request #160 from AuthMe-Team/master
PerWorldItems version check + little fix
This commit is contained in:
commit
9823956658
@ -187,14 +187,17 @@ public class AuthMe extends JavaPlugin {
|
||||
mail = new SendMailSSL(this);
|
||||
|
||||
// Check Citizens Version
|
||||
citizensVersion();
|
||||
checkCitizens();
|
||||
|
||||
// Check Combat Tag Version
|
||||
combatTag();
|
||||
checkCombatTag();
|
||||
|
||||
// Check Multiverse
|
||||
checkMultiverse();
|
||||
|
||||
// Check PerWorldInventories Version
|
||||
checkPerWorldInventories();
|
||||
|
||||
// Check ChestShop
|
||||
checkChestShop();
|
||||
|
||||
@ -354,6 +357,27 @@ public class AuthMe extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
public void checkPerWorldInventories() {
|
||||
if (this.getServer().getPluginManager().getPlugin("PerWorldInventories") != null && this.getServer().getPluginManager().getPlugin("PerWorldInventories").isEnabled()) {
|
||||
try {
|
||||
String ver = Bukkit.getServer().getPluginManager().getPlugin("PerWorldInventories").getDescription().getVersion();
|
||||
try {
|
||||
double version = Double.valueOf(ver.split(" ")[0]);
|
||||
if (version < 1.57)
|
||||
ConsoleLogger.showError("Please Update your PerWorldInventories version! INVENTORY WIPE may occur!");
|
||||
} catch (NumberFormatException nfe) {
|
||||
try {
|
||||
double version = Double.valueOf(ver.split("t")[0]);
|
||||
if (version < 1.57)
|
||||
ConsoleLogger.showError("Please Update your PerWorldInventories version! INVENTORY WIPE may occur!");
|
||||
} catch (NumberFormatException nfee) {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkMultiverse() {
|
||||
if (!Settings.multiverse) {
|
||||
multiverse = null;
|
||||
@ -403,7 +427,7 @@ public class AuthMe extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
public void combatTag() {
|
||||
public void checkCombatTag() {
|
||||
if (this.getServer().getPluginManager().getPlugin("CombatTag") != null && this.getServer().getPluginManager().getPlugin("CombatTag").isEnabled()) {
|
||||
this.CombatTag = true;
|
||||
} else {
|
||||
@ -411,7 +435,7 @@ public class AuthMe extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
public void citizensVersion() {
|
||||
public void checkCitizens() {
|
||||
if (this.getServer().getPluginManager().getPlugin("Citizens") != null && this.getServer().getPluginManager().getPlugin("Citizens").isEnabled())
|
||||
this.isCitizensActive = true;
|
||||
else this.isCitizensActive = false;
|
||||
|
@ -306,6 +306,8 @@ public class FileCache {
|
||||
a++;
|
||||
}
|
||||
}
|
||||
if (reader != null)
|
||||
reader.close();
|
||||
return new DataFileCache(stacki, stacka, group, op, flying);
|
||||
} else {
|
||||
// NEW METHOD
|
||||
|
@ -84,9 +84,9 @@ public class AuthMeServerListener implements Listener {
|
||||
if (pluginName.equalsIgnoreCase("ChestShop"))
|
||||
plugin.checkChestShop();
|
||||
if (pluginName.equalsIgnoreCase("CombatTag"))
|
||||
plugin.combatTag();
|
||||
plugin.checkCombatTag();
|
||||
if (pluginName.equalsIgnoreCase("Citizens"))
|
||||
plugin.citizensVersion();
|
||||
plugin.checkCitizens();
|
||||
if (pluginName.equalsIgnoreCase("Vault"))
|
||||
plugin.checkVault();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user