set protect inventory to false in config file if protocol lib is not found.

This commit is contained in:
DNx5 2015-11-25 00:43:55 +07:00
parent 25c23e144c
commit ea420ab05f
2 changed files with 10 additions and 9 deletions

View File

@ -692,18 +692,23 @@ public class AuthMe extends JavaPlugin {
if (Settings.protectInventoryBeforeLogInEnabled) {
ConsoleLogger.showError("WARNING!!! The protectInventory feature requires ProtocolLib! Disabling it...");
Settings.protectInventoryBeforeLogInEnabled = false;
getSettings().set("settings.restrictions.ProtectInventoryBeforeLogIn", false);
}
return;
}
if (Settings.protectInventoryBeforeLogInEnabled) {
if (inventoryProtector == null) {
inventoryProtector = new AuthMeInventoryPacketAdapter(this);
inventoryProtector.register();
} else if (inventoryProtector != null) {
}
} else {
if (inventoryProtector != null) {
ProtocolLibrary.getProtocolManager().removePacketListener(inventoryProtector);
inventoryProtector = null;
}
}
}
// Save Player Data
public void savePlayer(Player player) {

View File

@ -621,10 +621,6 @@ public final class Settings extends YamlConfiguration {
set("Email.emailBlacklisted", new ArrayList<String>());
changes = true;
}
if (contains("Performances.useMultiThreading")) {
set("Performances.useMultiThreading", null);
changes = true;
}
if (contains("Performances")) {
set("Performances", null);
changes = true;