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) {
|
if (Settings.protectInventoryBeforeLogInEnabled) {
|
||||||
ConsoleLogger.showError("WARNING!!! The protectInventory feature requires ProtocolLib! Disabling it...");
|
ConsoleLogger.showError("WARNING!!! The protectInventory feature requires ProtocolLib! Disabling it...");
|
||||||
Settings.protectInventoryBeforeLogInEnabled = false;
|
Settings.protectInventoryBeforeLogInEnabled = false;
|
||||||
|
getSettings().set("settings.restrictions.ProtectInventoryBeforeLogIn", false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.protectInventoryBeforeLogInEnabled) {
|
if (Settings.protectInventoryBeforeLogInEnabled) {
|
||||||
inventoryProtector = new AuthMeInventoryPacketAdapter(this);
|
if (inventoryProtector == null) {
|
||||||
inventoryProtector.register();
|
inventoryProtector = new AuthMeInventoryPacketAdapter(this);
|
||||||
} else if (inventoryProtector != null) {
|
inventoryProtector.register();
|
||||||
ProtocolLibrary.getProtocolManager().removePacketListener(inventoryProtector);
|
}
|
||||||
inventoryProtector = null;
|
} 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>());
|
set("Email.emailBlacklisted", new ArrayList<String>());
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
if (contains("Performances.useMultiThreading")) {
|
|
||||||
set("Performances.useMultiThreading", null);
|
|
||||||
changes = true;
|
|
||||||
}
|
|
||||||
if (contains("Performances")) {
|
if (contains("Performances")) {
|
||||||
set("Performances", null);
|
set("Performances", null);
|
||||||
changes = true;
|
changes = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user