mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Added %value% placeholders for all curses and Abattoir, Abrasion, Aquatic, Arachnid, Atmospheric, Aerial, and Backstab
This commit is contained in:
parent
0eeb1ab37c
commit
4f39736dc1
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.curse;
|
||||
|
||||
import com.willfp.eco.core.events.ArmorEquipEvent;
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.eco.util.VectorUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
@ -30,6 +31,11 @@ public class CallingCurse extends EcoEnchant implements TimedRunnable {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(distance);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onArmorEquip(@NotNull final ArmorEquipEvent event) {
|
||||
refresh();
|
||||
|
@ -17,6 +17,14 @@ public class FragilityCurse extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format((
|
||||
this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "minimum-extra-durability")
|
||||
+ this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "maximum-extra-durability")
|
||||
) / 2D);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onItemDamage(@NotNull final PlayerItemDamageEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.curse;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -16,6 +17,11 @@ public class HungerCurse extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "times-more-hunger"));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onHunger(@NotNull final FoodLevelChangeEvent event) {
|
||||
if (!(event.getEntity() instanceof Player player)) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -17,6 +18,11 @@ public class Abattoir extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier") * 100 * (level + 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.DurabilityUtils;
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||
@ -20,6 +21,11 @@ public class Abrasion extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity uncastVictim,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -16,6 +17,11 @@ public class Aerial extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier") * level * 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBowShoot(@NotNull final LivingEntity shooter,
|
||||
@NotNull final Arrow arrow,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -16,6 +17,11 @@ public class Aquatic extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier") * level * 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -16,6 +17,11 @@ public class Arachnid extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier") * 100 * (level + 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -16,6 +17,11 @@ public class Atmospheric extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier") * level * 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentLaunch(@NotNull final LivingEntity shooter,
|
||||
@NotNull final Trident trident,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -15,6 +16,11 @@ public class Backstab extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return NumberUtils.format(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier") * level * 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Calling"
|
||||
description: Angers all nearby mobs.
|
||||
description: Angers all mobs within &a%value%&r blocks.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Fragility"
|
||||
description: Decreases item durability.
|
||||
description: Decreases item durability by &a%value%&r times.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Hunger"
|
||||
description: Increases hunger loss.
|
||||
description: Increases hunger loss by &a%value%&rx.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Abattoir"
|
||||
description: Increases damage against passive mobs.
|
||||
description: Increases damage against passive mobs by &a%value%&r.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Abrasion"
|
||||
description: Damages your opponents armor.
|
||||
description: Damages your opponents armor by &a%value%&r.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Aerial"
|
||||
description: Increases arrow damage when shot while in air.
|
||||
description: Increases arrow damage by &a%value%%&r when shot while in air.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Aquatic"
|
||||
description: Trident deals additional damage when shot from water.
|
||||
description: Trident deals &a%value%%&r more damage when shot from water.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Arachnid"
|
||||
description: Increases damage against spiders.
|
||||
description: Increases damage against spiders by &a%value%%&r.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Atmospheric"
|
||||
description: Increases trident damage when you are in air.
|
||||
description: Increases trident damage by &a%value%%&r when you are in air.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Backstab"
|
||||
description: Increases damage when behind opponent.
|
||||
description: Deal &a%value%%&r more damage from behind.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
Loading…
Reference in New Issue
Block a user