mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
added perworlditems check
This commit is contained in:
parent
945b24990a
commit
72f0f65bed
@ -187,14 +187,17 @@ public class AuthMe extends JavaPlugin {
|
|||||||
mail = new SendMailSSL(this);
|
mail = new SendMailSSL(this);
|
||||||
|
|
||||||
// Check Citizens Version
|
// Check Citizens Version
|
||||||
citizensVersion();
|
checkCitizens();
|
||||||
|
|
||||||
// Check Combat Tag Version
|
// Check Combat Tag Version
|
||||||
combatTag();
|
checkCombatTag();
|
||||||
|
|
||||||
// Check Multiverse
|
// Check Multiverse
|
||||||
checkMultiverse();
|
checkMultiverse();
|
||||||
|
|
||||||
|
// Check PerWorldInventories Version
|
||||||
|
checkPerWorldInventories();
|
||||||
|
|
||||||
// Check ChestShop
|
// Check ChestShop
|
||||||
checkChestShop();
|
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() {
|
public void checkMultiverse() {
|
||||||
if (!Settings.multiverse) {
|
if (!Settings.multiverse) {
|
||||||
multiverse = null;
|
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()) {
|
if (this.getServer().getPluginManager().getPlugin("CombatTag") != null && this.getServer().getPluginManager().getPlugin("CombatTag").isEnabled()) {
|
||||||
this.CombatTag = true;
|
this.CombatTag = true;
|
||||||
} else {
|
} 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())
|
if (this.getServer().getPluginManager().getPlugin("Citizens") != null && this.getServer().getPluginManager().getPlugin("Citizens").isEnabled())
|
||||||
this.isCitizensActive = true;
|
this.isCitizensActive = true;
|
||||||
else this.isCitizensActive = false;
|
else this.isCitizensActive = false;
|
||||||
|
@ -84,9 +84,9 @@ public class AuthMeServerListener implements Listener {
|
|||||||
if (pluginName.equalsIgnoreCase("ChestShop"))
|
if (pluginName.equalsIgnoreCase("ChestShop"))
|
||||||
plugin.checkChestShop();
|
plugin.checkChestShop();
|
||||||
if (pluginName.equalsIgnoreCase("CombatTag"))
|
if (pluginName.equalsIgnoreCase("CombatTag"))
|
||||||
plugin.combatTag();
|
plugin.checkCombatTag();
|
||||||
if (pluginName.equalsIgnoreCase("Citizens"))
|
if (pluginName.equalsIgnoreCase("Citizens"))
|
||||||
plugin.citizensVersion();
|
plugin.checkCitizens();
|
||||||
if (pluginName.equalsIgnoreCase("Vault"))
|
if (pluginName.equalsIgnoreCase("Vault"))
|
||||||
plugin.checkVault();
|
plugin.checkVault();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user