Added "ticks-per-level" and "amplifier-per-level" config options for Famine enchantment

This commit is contained in:
_OfTeN_ 2021-11-01 20:48:48 +03:00
parent 3bea8c711d
commit 61cbf1e1c6
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
import com.willfp.ecoenchants.enchantments.EcoEnchant;
import com.willfp.ecoenchants.enchantments.EcoEnchants;
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
import org.bukkit.entity.LivingEntity;
@ -35,7 +36,7 @@ public class Famine extends EcoEnchant {
return;
}
victim.addPotionEffect(new PotionEffect(PotionEffectType.HUNGER, level * 40, level));
victim.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, level * 40, level));
victim.addPotionEffect(new PotionEffect(PotionEffectType.HUNGER, level * this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION+"ticks-per-level"), level));
victim.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, level * 40, level*this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION+"amplifier-per-level")-1));
}
}

View File

@ -26,4 +26,6 @@ general-config:
config:
allow-not-fully-charged: false
chance-per-level: 1.5
chance-per-level: 1.5
ticks-per-level: 40
amplifier-per-levl: 1