mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Added chance placeholders to all chance-based enchantments
This commit is contained in:
parent
ef0379900f
commit
29d41cc284
@ -15,6 +15,11 @@ public class BreaklessnessCurse extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamageBlock(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -14,6 +14,11 @@ public class HarmlessnessCurse extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -15,6 +15,11 @@ public class MisfortuneCurse extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -25,6 +25,11 @@ public class Arborist extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -14,6 +14,11 @@ public class Arcanic extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamageWearingArmor(@NotNull final LivingEntity victim,
|
||||
final int level,
|
||||
|
@ -22,6 +22,11 @@ public class Beheading extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDeath(@NotNull final EntityDeathEvent event) {
|
||||
if (event.getEntity().getKiller() == null) {
|
||||
|
@ -23,6 +23,11 @@ public class BlastMining extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -17,6 +17,11 @@ public class Bleed extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -19,6 +19,11 @@ public class Blind extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -14,6 +14,11 @@ public class BlockBreather extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamageWearingArmor(@NotNull final LivingEntity victim,
|
||||
final int level,
|
||||
|
@ -16,6 +16,11 @@ public class Conclude extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -16,6 +16,11 @@ public class Disable extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -17,6 +17,11 @@ public class Dullness extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -17,6 +17,11 @@ public class Economical extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onElytraBoost(@NotNull final PlayerElytraBoostEvent event) {
|
||||
if (!EnchantChecks.chestplate(event.getPlayer(), this)) {
|
||||
|
@ -17,6 +17,11 @@ public class Electroshock extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeflect(@NotNull final Player blocker,
|
||||
@NotNull final LivingEntity attacker,
|
||||
|
@ -14,6 +14,11 @@ public class Evasion extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamageWearingArmor(@NotNull final LivingEntity victim,
|
||||
final int level,
|
||||
|
@ -14,6 +14,11 @@ public class Extinguishing extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamageWearingArmor(@NotNull final LivingEntity victim,
|
||||
final int level,
|
||||
|
@ -16,6 +16,11 @@ public class Famine extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -16,6 +16,11 @@ public class Finality extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -15,6 +15,11 @@ public class Finishing extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -18,6 +18,11 @@ public class Flinch extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeflect(@NotNull final Player blocker,
|
||||
@NotNull final LivingEntity attacker,
|
||||
|
@ -14,6 +14,11 @@ public class Freerunner extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFallDamage(@NotNull final LivingEntity faller,
|
||||
final int level,
|
||||
|
@ -20,6 +20,11 @@ public class Frozen extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onHurt(@NotNull final EntityDamageByEntityEvent event) {
|
||||
if (!(event.getEntity() instanceof Player player)) {
|
||||
|
@ -20,6 +20,11 @@ public class Fury extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -20,6 +20,11 @@ public class Graceful extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onFall(@NotNull final PlayerMoveEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
@ -18,6 +18,11 @@ public class IceShot extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -18,6 +18,11 @@ public class Identify extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeflect(@NotNull final Player blocker,
|
||||
@NotNull final LivingEntity attacker,
|
||||
|
@ -19,6 +19,11 @@ public class Ignite extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowHit(@NotNull final LivingEntity uncastShooter,
|
||||
final int level,
|
||||
|
@ -16,6 +16,11 @@ public class IllusionAspect extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -16,6 +16,11 @@ public class Impact extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -21,6 +21,11 @@ public class Infuriate extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeflect(@NotNull final Player blocker,
|
||||
@NotNull final LivingEntity attacker,
|
||||
|
@ -18,6 +18,11 @@ public class Lesion extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTridentDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -19,6 +19,11 @@ public class Levitate extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -19,6 +19,11 @@ public class LuckyCatch extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onFish(@NotNull final PlayerFishEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
@ -20,6 +20,11 @@ public class Necrotic extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void necroticKill(@NotNull final EntityDeathEvent event) {
|
||||
if (event.getEntity().getKiller() == null) {
|
||||
|
@ -18,6 +18,11 @@ public class Paralyze extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeflect(@NotNull final Player blocker,
|
||||
@NotNull final LivingEntity attacker,
|
||||
|
@ -21,6 +21,11 @@ public class Rage extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -2,6 +2,7 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||
|
||||
public class Reaper extends EcoEnchant {
|
||||
public Reaper() {
|
||||
@ -10,5 +11,10 @@ public class Reaper extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
// Actual code is in soulbound.
|
||||
}
|
||||
|
@ -16,6 +16,11 @@ public class Sating extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onSatingHunger(@NotNull final FoodLevelChangeEvent event) {
|
||||
if (!(event.getEntity() instanceof Player player)) {
|
||||
|
@ -19,6 +19,11 @@ public class Sickening extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -28,6 +28,11 @@ public class Spearfishing extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onSpearfishingLand(@NotNull final ProjectileHitEvent event) {
|
||||
if (event.getEntityType() != EntityType.TRIDENT) {
|
||||
|
@ -17,6 +17,11 @@ public class Stalwart extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamageWearingArmor(@NotNull final LivingEntity victim,
|
||||
final int level,
|
||||
|
@ -16,6 +16,11 @@ public class Stamina extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onStaminaHunger(@NotNull final FoodLevelChangeEvent event) {
|
||||
if (!(event.getEntity() instanceof Player player)) {
|
||||
|
@ -21,6 +21,11 @@ public class StoneSwitcher extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -17,6 +17,11 @@ public class StrayAspect extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -15,6 +15,11 @@ public class Supercritical extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -16,6 +16,11 @@ public class Thor extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -16,6 +16,11 @@ public class Toxic extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -21,6 +21,11 @@ public class Transfuse extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -16,6 +16,11 @@ public class VampireAspect extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -17,6 +17,11 @@ public class Venom extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -22,6 +22,11 @@ public class WoodSwitcher extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(@NotNull final Player player,
|
||||
@NotNull final Block block,
|
||||
|
@ -18,6 +18,11 @@ public class Wound extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -17,6 +17,11 @@ public class Zeus extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrowDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -16,6 +16,11 @@ public class Bolt extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -20,6 +20,11 @@ public class Confusion extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity uncastVictim,
|
||||
|
@ -17,6 +17,11 @@ public class Volatile extends EcoEnchant {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlaceholder(final int level) {
|
||||
return EnchantmentUtils.chancePlaceholder(this, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity uncastAttacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
|
@ -33,6 +33,18 @@ public class EnchantmentUtils {
|
||||
return NumberUtils.randFloat(0, 1) < ((enchantment.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "chance-per-level") * level) / 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the enchantment has successfully passed its specified chance.
|
||||
*
|
||||
* @param enchantment The enchantment to query.
|
||||
* @param level The level to base the chance off of.
|
||||
* @return If the enchantment should then be executed.
|
||||
*/
|
||||
public static String chancePlaceholder(@NotNull final EcoEnchant enchantment,
|
||||
final int level) {
|
||||
return NumberUtils.format(enchantment.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "chance-per-level") * level);
|
||||
}
|
||||
|
||||
/**
|
||||
* If attack was fully charged if required.
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Breaklessness"
|
||||
description: Chance to prevent block breaking.
|
||||
description: '&a%value%%&r chance to prevent block breaking.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Harmlessness"
|
||||
description: Chance for attacks to do nothing.
|
||||
description: '&a%value%%&r chance for attacks to do nothing.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Misfortune"
|
||||
description: Chance for blocks to not drop items.
|
||||
description: '&a%value%%&r chance for blocks to not drop items.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Arcanic"
|
||||
description: Chance to ignore potion damage.
|
||||
description: '&a%value%%&r chance to ignore potion damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Beheading"
|
||||
description: Chance of getting player or mob head.
|
||||
description: '&a%value%%&r chance of getting player or mob head.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Bleed"
|
||||
description: Causes your opponent to bleed, damaging them repeatedly.
|
||||
description: '&a%value%%&r chance to cause your opponent to bleed, damaging them repeatedly.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Blind"
|
||||
description: Chance of blinding your opponent.
|
||||
description: '&a%value%%&r chance of blinding your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Block Breather"
|
||||
description: Chance to ignore suffocation damage.
|
||||
description: '&a%value%%&r chance to ignore suffocation damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Conclude"
|
||||
description: Chance to instantly kill entities on low health.
|
||||
description: '&a%value%%&r chance to instantly kill entities on low health.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Disable"
|
||||
description: Chance of giving your opponent extreme mining fatigue.
|
||||
description: '&a%value%%&r chance of giving your opponent extreme mining fatigue.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Dullness"
|
||||
description: Chance of giving your opponent weakness.
|
||||
description: '&a%value%%&r chance of giving your opponent weakness.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Economical"
|
||||
description: Chance to not consume fireworks while boosting.
|
||||
description: '&a%value%%&r chance to not consume fireworks while boosting.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Electroshock"
|
||||
description: Chance to strike lightning on your attacker.
|
||||
description: '&a%value%%&r chance to strike lightning on your attacker.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Evasion"
|
||||
description: Chance to ignore incoming damage.
|
||||
description: '&a%value%%&r chance to ignore incoming damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Extinguishing"
|
||||
description: Chance to remove fire when taking fire damage.
|
||||
description: '&a%value%%&r chance to remove fire when taking fire damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Famine"
|
||||
description: Chance of giving your opponent hunger.
|
||||
description: '&a%value%%&r chance of giving your opponent hunger.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Finality"
|
||||
description: Chance to instantly kill entities on low health.
|
||||
description: '&a%value%%&r chance to instantly kill entities on low health.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Finishing"
|
||||
description: Chance to instantly kill entities on low health.
|
||||
description: '&a%value%%&r chance to instantly kill entities on low health.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Flinch"
|
||||
description: Chance to blind your attacker.
|
||||
description: '&a%value%%&r chance to blind your attacker.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Freerunner"
|
||||
description: Chance to ignore fall damage.
|
||||
description: '&a%value%%&r chance to ignore fall damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Frozen"
|
||||
description: Chance to give your attacker slowness.
|
||||
description: '&a%value%%&r chance to give your attacker slowness.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Fury"
|
||||
description: Chance of angering nearby monsters towards your opponent.
|
||||
description: '&a%value%%&r chance of angering nearby monsters towards your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Graceful"
|
||||
description: Chance of getting slow falling just above hitting the ground.
|
||||
description: '&a%value%%&r chance of getting slow falling just above hitting the ground.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Ice Shot"
|
||||
description: Chance of freezing your opponent.
|
||||
description: '&a%value%%&r chance of freezing your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Identify"
|
||||
description: Chance to give your attacker glowing.
|
||||
description: '&a%value%%&r chance to give your attacker glowing.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Ignite"
|
||||
description: Chance to light hit block on fire.
|
||||
description: '&a%value%%&r chance to light hit block on fire.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Illusion Aspect"
|
||||
description: Chance to blind and nauseate opponent.
|
||||
description: '&a%value%%&r chance to blind and nauseate opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Impact"
|
||||
description: Small chance to deal extreme damage.
|
||||
description: '&a%value%%&r chance to deal extreme damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Infuriate"
|
||||
description: Chance to cause nearby mobs to attack your opponent.
|
||||
description: '&a%value%%&r chance to cause nearby mobs to attack your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Instantaneous"
|
||||
description: Chance of instantly breaking blocks.
|
||||
description: '&a%value%%&r chance to instantly break blocks.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Lesion"
|
||||
description: Causes your opponent to bleed, damaging them repeatedly.
|
||||
description: '&a%value%%&r chance to your opponent to bleed, damaging them repeatedly.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Levitate"
|
||||
description: Chance of applying levitation to your opponent.
|
||||
description: '&a%value%%&r chance of applying levitation to your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Lucky Catch"
|
||||
description: Chance to double fishing drops.
|
||||
description: '&a%value%%&r chance to double fishing drops.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Necrotic"
|
||||
description: Wither skeletons have a higher chance to drop skulls.
|
||||
description: Wither skeletons have a &a%value%%&r higher chance to drop skulls.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Paralyze"
|
||||
description: Chance to give your attacker mining fatigue.
|
||||
description: '&a%value%%&r chance to give your attacker mining fatigue.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Rage"
|
||||
description: Chance of angering nearby monsters towards your opponent.
|
||||
description: '&a%value%%&r chance of angering nearby monsters towards your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Reaper"
|
||||
description: Chance to prevent your opponents soulbound from working.
|
||||
description: '&a%value%%&r chance to prevent your opponents soulbound from working.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Sating"
|
||||
description: Reduces hunger loss.
|
||||
description: Reduces hunger loss by &a%value%%&r.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Sickening"
|
||||
description: Chance of nauseating your opponent.
|
||||
description: '&a%value%%&r chance of nauseating your opponent.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Spearfishing"
|
||||
description: Chance of dropping fish when tridenting water.
|
||||
description: '&a%value%%&r chance of dropping fish when tridenting water.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Stalwart"
|
||||
description: Chance to get resistance for a short time when taking damage.
|
||||
description: '&a%value%%&r chance to get resistance for a short time when taking damage.'
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Stamina"
|
||||
description: Decreases hunger loss while sprinting.
|
||||
description: Decreases hunger loss by &a%value%%&r while sprinting.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user