Use Addon#logWarning() instead of BentoBox's logger

This commit is contained in:
Florian CUNY 2019-09-07 14:29:58 +02:00 committed by GitHub
parent 407c2640f1
commit e428d52a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ public class Settings {
setLevelCost(level.getConfig().getInt("levelcost", 100));
if (getLevelCost() < 1) {
setLevelCost(1);
level.getLogger().warning("levelcost in blockvalues.yml cannot be less than 1. Setting to 1.");
level.logWarning("levelcost in blockvalues.yml cannot be less than 1. Setting to 1.");
}
if (level.getConfig().isSet("limits")) {
@ -79,7 +79,7 @@ public class Settings {
Material mat = Material.valueOf(material);
bl.put(mat, level.getConfig().getInt("limits." + material, 0));
} catch (Exception e) {
level.getLogger().warning(() -> "Unknown material (" + material + ") in blockvalues.yml Limits section. Skipping...");
level.logWarning("Unknown material (" + material + ") in blockvalues.yml Limits section. Skipping...");
}
}
setBlockLimits(bl);
@ -92,12 +92,12 @@ public class Settings {
Material mat = Material.valueOf(material);
bv.put(mat, level.getConfig().getInt("blocks." + material, 0));
} catch (Exception e) {
level.getLogger().warning(()-> "Unknown material (" + material + ") in config.yml blocks section. Skipping...");
level.logWarning("Unknown material (" + material + ") in config.yml blocks section. Skipping...");
}
}
setBlockValues(bv);
} else {
level.getLogger().severe("No block values in config.yml! All island levels will be zero!");
level.logWarning("No block values in config.yml! All island levels will be zero!");
}
// Worlds
if (level.getConfig().isSet("worlds")) {
@ -113,7 +113,7 @@ public class Settings {
worldBlockValues.put(bWorld, values);
}
} else {
level.getLogger().severe(() -> "Level Addon: No such world in config.yml : " + world);
level.logWarning("Level Addon: No such world in config.yml : " + world);
}
}
}