mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-19 08:45:12 +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,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) {
|
||||
|
@ -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