mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-19 15:17:56 +01:00
set protect inventory to false in config file if protocol lib is not found.
This commit is contained in:
parent
25c23e144c
commit
ea420ab05f
@ -692,16 +692,21 @@ 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) {
|
||||
inventoryProtector = new AuthMeInventoryPacketAdapter(this);
|
||||
inventoryProtector.register();
|
||||
} else if (inventoryProtector != null) {
|
||||
ProtocolLibrary.getProtocolManager().removePacketListener(inventoryProtector);
|
||||
inventoryProtector = null;
|
||||
if (inventoryProtector == null) {
|
||||
inventoryProtector = new AuthMeInventoryPacketAdapter(this);
|
||||
inventoryProtector.register();
|
||||
}
|
||||
} else {
|
||||
if (inventoryProtector != null) {
|
||||
ProtocolLibrary.getProtocolManager().removePacketListener(inventoryProtector);
|
||||
inventoryProtector = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user