mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-11-18 06:24:17 +01:00
Removed warnings if custom mining is disabled
This commit is contained in:
parent
14aad71f2f
commit
9790cfac51
@ -205,12 +205,15 @@ public class CustomBlockManager extends SpecificProfessionManager {
|
||||
this.protectVanillaBlocks = config.getBoolean("protect-vanilla-blocks");
|
||||
this.enableToolRestrictions = config.getBoolean("enable-tool-restrictions");
|
||||
|
||||
for (String key : config.getStringList("conditions"))
|
||||
try {
|
||||
customMineConditions.add(MMOCore.plugin.loadManager.loadCondition(new MMOLineConfig(key)));
|
||||
} catch (IllegalArgumentException exception) {
|
||||
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load custom mining condition '" + key + "': " + exception.getMessage());
|
||||
}
|
||||
// Avoid warnings if disabled
|
||||
if (enabled)
|
||||
for (String key : config.getStringList("conditions"))
|
||||
try {
|
||||
customMineConditions.add(MMOCore.plugin.loadManager.loadCondition(new MMOLineConfig(key)));
|
||||
} catch (IllegalArgumentException exception) {
|
||||
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load custom mining condition '" + key + "': " + exception.getMessage());
|
||||
}
|
||||
else customMineConditions.clear();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
||||
Loading…
Reference in New Issue
Block a user