default values incase someone broke the config (it happens, it just
happens)
This commit is contained in:
parent
cf853f7015
commit
de8ecdaee9
1 changed files with 7 additions and 7 deletions
|
@ -52,12 +52,12 @@ public class Main extends JavaPlugin implements Listener {
|
||||||
}
|
}
|
||||||
config = YamlConfiguration.loadConfiguration(configFile);
|
config = YamlConfiguration.loadConfiguration(configFile);
|
||||||
|
|
||||||
ai = config.getBoolean("ai");
|
ai = config.getBoolean("ai", true);
|
||||||
chance = config.getDouble("chance");
|
chance = config.getDouble("chance", 0.02D);
|
||||||
attackDamage = config.getDouble("attackDamage");
|
attackDamage = config.getDouble("attackDamage", 1.0D);
|
||||||
attackReach = config.getDouble("attackReach");
|
attackReach = config.getDouble("attackReach", 2D);
|
||||||
expandUp = config.getDouble("expandUp");
|
expandUp = config.getDouble("expandUp", 0D);
|
||||||
for (Object s : config.getList("effects")) {
|
for (Object s : config.getList("effects", new ArrayList<Object>)) {
|
||||||
try {
|
try {
|
||||||
String[] parts = ((String) s).split(":");
|
String[] parts = ((String) s).split(":");
|
||||||
if (!(StringUtils.isNumeric(parts[1]))) {
|
if (!(StringUtils.isNumeric(parts[1]))) {
|
||||||
|
@ -88,7 +88,7 @@ public class Main extends JavaPlugin implements Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.runTaskTimer(this, config.getLong("hitDelay"), 0L);
|
}.runTaskTimer(this, config.getLong("hitDelay", 20L), 0L);
|
||||||
if (headRotations) {
|
if (headRotations) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue