From 9092dca013439088e2f8e351eb8ab0199a8dfa73 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 10 Nov 2020 18:43:00 +0000 Subject: [PATCH] Added more stray aspect configurability --- .../enchantments/ecoenchants/normal/StrayAspect.java | 6 ++++-- Plugin/src/main/resources/enchants/normal/strayaspect.yml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java b/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java index 273d9def..cee71503 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java @@ -28,7 +28,9 @@ public final class StrayAspect extends EcoEnchant { if(!EnchantmentUtils.passedChance(this, level)) return; - victim.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, level * 10, level)); - victim.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, level * 10, level)); + int ticksPerLevel = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "ticks-per-level"); + + victim.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, level * ticksPerLevel, level)); + victim.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, level * ticksPerLevel, level)); } } diff --git a/Plugin/src/main/resources/enchants/normal/strayaspect.yml b/Plugin/src/main/resources/enchants/normal/strayaspect.yml index 2eb5b21f..0437e3f7 100644 --- a/Plugin/src/main/resources/enchants/normal/strayaspect.yml +++ b/Plugin/src/main/resources/enchants/normal/strayaspect.yml @@ -21,4 +21,5 @@ general-config: config: allow-not-fully-charged: false - chance-per-level: 1 #chance of slowness per level \ No newline at end of file + chance-per-level: 1 #chance of slowness per level + ticks-per-level: 10 \ No newline at end of file