This commit is contained in:
nulli0n 2022-07-31 16:26:23 +05:00
parent e2cb12ddd5
commit 10249cb318
109 changed files with 608 additions and 372 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>ExcellentEnchants</artifactId>
<groupId>su.nightexpress.excellentenchants</groupId>
<version>3.2.3</version>
<version>3.2.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -27,27 +27,27 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.19.1-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>su.nightexpress.excellentenchants</groupId>
<artifactId>NMS</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
</dependency>
<dependency>
<groupId>su.nightexpress.excellentenchants</groupId>
<artifactId>V1_17_R1</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
</dependency>
<dependency>
<groupId>su.nightexpress.excellentenchants</groupId>
<artifactId>V1_18_R2</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
</dependency>
<dependency>
<groupId>su.nightexpress.excellentenchants</groupId>
<artifactId>V1_19_R1</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>

View File

@ -74,6 +74,13 @@ public abstract class ExcellentEnchant extends Enchantment implements IListener
this.updateConfig();
this.cfg.saveChanges();
this.priority = priority;
this.conflicts = new HashSet<>();
this.loadConfig();
}
public void loadConfig() {
this.cfg.reload();
this.displayName = StringUtil.color(cfg.getString("Name", this.getId()));
this.tier = EnchantManager.getTierById(cfg.getString("Tier", Placeholders.DEFAULT));
@ -83,7 +90,6 @@ public abstract class ExcellentEnchant extends Enchantment implements IListener
this.tier.getEnchants().add(this);
this.description = StringUtil.color(cfg.getStringList("Description"));
this.conflicts = new HashSet<>();
this.isTreasure = cfg.getBoolean("Is_Treasure");
this.levelMin = cfg.getInt("Level.Min");
this.levelMax = cfg.getInt("Level.Max");
@ -102,6 +108,7 @@ public abstract class ExcellentEnchant extends Enchantment implements IListener
protected void updateConfig() {
cfg.addMissing("Is_Treasure", false);
cfg.addMissing("Conflicts", new ArrayList<String>());
cfg.addMissing("Settings.Cost.Enabled", false);
cfg.addMissing("Settings.Cost.Item.Material", Material.AIR.name());
cfg.addMissing("Settings.Cost.Item.Amount", 1);
@ -201,12 +208,11 @@ public abstract class ExcellentEnchant extends Enchantment implements IListener
return itemType == null ? new FitItemType[0] : new FitItemType[]{itemType};
}
protected void addConflicts() {
}
protected void addConflict(@NotNull Enchantment enchantment) {
this.conflicts.add(enchantment);
private void addConflicts() {
this.conflicts.addAll(this.getConfig().getStringSet("Conflicts").stream()
.map(enchId -> Enchantment.getByKey(NamespacedKey.minecraft(enchId.toLowerCase())))
.filter(Objects::nonNull)
.toList());
}
public boolean hasCostItem() {
@ -326,26 +332,6 @@ public abstract class ExcellentEnchant extends Enchantment implements IListener
return Stream.of(this.getFitItemTypes()).anyMatch(fitItemType -> fitItemType.isIncluded(item));
}
/*protected boolean isFitItemType(@NotNull ItemStack item) {
EnchantmentTarget target = this.getItemTarget();
return switch (target) {
case ARMOR -> ItemUtil.isArmor(item);
case ARMOR_FEET -> ItemUtil.isBoots(item);
case ARMOR_LEGS -> ItemUtil.isLeggings(item);
case ARMOR_TORSO -> ItemUtil.isChestplate(item) || (Config.ENCHANTMENTS_ITEM_ELYTRA_AS_CHESTPLATE && item.getType() == Material.ELYTRA);
case ARMOR_HEAD -> ItemUtil.isHelmet(item);
case WEAPON -> ItemUtil.isSword(item) || (Config.ENCHANTMENTS_ITEM_AXES_AS_SWORDS && ItemUtil.isAxe(item));
case TOOL -> ItemUtil.isTool(item);
case BOW -> item.getType() == Material.BOW || (Config.ENCHANTMENTS_ITEM_CROSSBOWS_AS_BOWS && ItemUtil.isBow(item));
case FISHING_ROD -> item.getType() == Material.FISHING_ROD;
case BREAKABLE -> true;
case WEARABLE -> EnchantManager.isEnchantable(item);
case TRIDENT -> ItemUtil.isTrident(item);
case CROSSBOW -> item.getType() == Material.CROSSBOW;
default -> false;
};
}*/
@Override
public boolean isCursed() {
return false;

View File

@ -16,13 +16,18 @@ import su.nightexpress.excellentenchants.manager.tasks.ArrowTrailsTask;
public abstract class IEnchantBowTemplate extends IEnchantChanceTemplate implements BowEnchant {
protected final String arrowTrailName;
protected final String arrowTrailData;
protected String arrowTrailName;
protected String arrowTrailData;
protected final String arrowMeta;
public IEnchantBowTemplate(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg, @NotNull EnchantPriority priority) {
super(plugin, cfg, priority);
this.arrowMeta = this.getId() + "_arrow";
}
@Override
public void loadConfig() {
super.loadConfig();
this.arrowTrailName = cfg.getString("Settings.Arrow.Trail.Name", "");
this.arrowTrailData = cfg.getString("Settings.Arrow.Trail.Data", "");
}

View File

@ -18,7 +18,11 @@ public abstract class IEnchantChanceTemplate extends ExcellentEnchant {
public IEnchantChanceTemplate(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg, @NotNull EnchantPriority priority) {
super(plugin, cfg, priority);
}
@Override
public void loadConfig() {
super.loadConfig();
this.triggerChance = new EnchantScaler(this, "Settings.Trigger_Chance");
}

View File

@ -20,7 +20,11 @@ public abstract class IEnchantCombatPotionTemplate extends IEnchantPotionTemplat
@NotNull EnchantPriority priority,
@NotNull PotionEffectType effectType) {
super(plugin, cfg, priority, effectType);
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", "");
this.particleData = cfg.getString("Settings.Particle.Data", "");
}

View File

@ -21,19 +21,24 @@ public abstract class IEnchantPotionTemplate extends IEnchantChanceTemplate {
public static final String PLACEHOLDER_POTION_DURATION = "%enchantment_potion_duration%";
public static final String PLACEHOLDER_POTION_TYPE = "%enchantment_potion_type%";
protected PotionEffectType potionEffectType;
protected PotionEffectType potionEffectType;
protected final boolean potionParticles;
protected Scaler potionDuration;
protected Scaler potionLevel;
protected final boolean potionParticles;
protected Scaler potionLevel;
public IEnchantPotionTemplate(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg,
@NotNull EnchantPriority priority,
@NotNull PotionEffectType potionEffectType) {
super(plugin, cfg, priority);
this.potionEffectType = potionEffectType;
this.potionParticles = !(this instanceof PassiveEnchant);
}
@Override
public void loadConfig() {
super.loadConfig();
this.potionDuration = new EnchantScaler(this, "Settings.Potion_Effect.Duration");
this.potionLevel = new EnchantScaler(this, "Settings.Potion_Effect.Level");
this.potionParticles = !(this instanceof PassiveEnchant);
}
@Override

View File

@ -159,7 +159,11 @@ public class EnchantRegister {
}
public static void setup() {
if (ExcellentEnchants.isLoaded) return; // Prevent to register enchantments during the runtime.
// Prevent to register enchantments during the runtime.
if (ExcellentEnchants.isLoaded) {
ENCHANT_LIST.forEach(ExcellentEnchant::loadConfig);
return;
}
//ENCHANT_LIST.clear();
Reflex.setFieldValue(Enchantment.class, "acceptingNew", true);

View File

@ -5,7 +5,6 @@ import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
@ -40,18 +39,22 @@ public class EnchantFlameWalker extends IEnchantChanceTemplate implements MoveEn
private static final BlockFace[] FACES = {BlockFace.SOUTH, BlockFace.NORTH, BlockFace.EAST, BlockFace.WEST};
private static final Map<Block, Long> BLOCKS_TO_DESTROY = new HashMap<>();
private final Scaler blockDecayTime;
private BlockTickTask blockTickTask;
private Scaler blockDecayTime;
private BlockTickTask blockTickTask;
public EnchantFlameWalker(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
this.blockDecayTime = new EnchantScaler(this, "Settings.Block_Decay");
this.blockTickTask = new BlockTickTask(plugin);
this.blockTickTask.start();
}
@Override
public void loadConfig() {
super.loadConfig();
this.blockDecayTime = new EnchantScaler(this, "Settings.Block_Decay");
}
@Override
protected void updateConfig() {
super.updateConfig();
@ -73,12 +76,6 @@ public class EnchantFlameWalker extends IEnchantChanceTemplate implements MoveEn
BLOCKS_TO_DESTROY.put(block, (long) (System.currentTimeMillis() + seconds * 1000L));
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(Enchantment.FROST_WALKER);
}
@Override
@NotNull
public EnchantmentTarget getItemTarget() {

View File

@ -26,10 +26,10 @@ public class EnchantRegrowth extends IEnchantChanceTemplate implements PassiveEn
public static final String ID = "regrowth";
private final String particleName;
private final String particleData;
private final long healthInterval;
private final Scaler healthAmount;
private String particleName;
private String particleData;
private long healthInterval;
private Scaler healthAmount;
private Task healthTask;
private static final String PLACEHOLDER_HEALTH_AMOUNT = "%enchantment_health_amount%";
@ -37,12 +37,18 @@ public class EnchantRegrowth extends IEnchantChanceTemplate implements PassiveEn
public EnchantRegrowth(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
this.healthTask = new Task(plugin);
this.healthTask.start();
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", Particle.HEART.name());
this.particleData = cfg.getString("Settings.Particle.Data", "");
this.healthInterval = cfg.getLong("Settings.Health.Interval", 100);
this.healthAmount = new EnchantScaler(this, "Settings.Health.Amount");
this.healthTask = new Task(plugin);
this.healthTask.start();
}
@Override

View File

@ -21,8 +21,8 @@ import java.util.function.UnaryOperator;
public class EnchantSaturation extends IEnchantChanceTemplate implements PassiveEnchant, ICleanable {
private final long saturationInterval;
private final Scaler saturationAmount;
private long saturationInterval;
private Scaler saturationAmount;
private Task saturationTask;
public static final String ID = "saturation";
@ -33,12 +33,17 @@ public class EnchantSaturation extends IEnchantChanceTemplate implements Passive
public EnchantSaturation(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
this.saturationInterval = cfg.getLong("Settings.Saturation.Interval", 100);
this.saturationAmount = new EnchantScaler(this, "Settings.Saturation.Amount");
this.saturationTask = new Task(plugin);
this.saturationTask.start();
}
@Override
public void loadConfig() {
super.loadConfig();
this.saturationInterval = cfg.getLong("Settings.Saturation.Interval", 100);
this.saturationAmount = new EnchantScaler(this, "Settings.Saturation.Amount");
}
@Override
protected void updateConfig() {
super.updateConfig();

View File

@ -22,15 +22,19 @@ import java.util.function.UnaryOperator;
public class EnchantSelfDestruction extends IEnchantChanceTemplate implements DeathEnchant {
private final Scaler explosionSize;
private Scaler explosionSize;
public static final String ID = "self_destruction";
private static final String META_EXPLOSION_SOURCE = ID + "_explosion_source";
private static final String PLACEHOLDER_EXPLOSION_POWER = "%enchantment_explosion_power%";
public EnchantSelfDestruction(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.explosionSize = new EnchantScaler(this, "Settings.Explosion.Size");
}

View File

@ -1,6 +1,5 @@
package su.nightexpress.excellentenchants.manager.enchants.bow;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Projectile;
@ -17,14 +16,13 @@ import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.BowEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
import java.util.function.UnaryOperator;
public class EnchantBomber extends IEnchantChanceTemplate implements BowEnchant {
private final Scaler fuseTicks;
private Scaler fuseTicks;
public static final String ID = "bomber";
@ -32,7 +30,11 @@ public class EnchantBomber extends IEnchantChanceTemplate implements BowEnchant
public EnchantBomber(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.HIGHEST);
}
@Override
public void loadConfig() {
super.loadConfig();
this.fuseTicks = new EnchantScaler(this, "Settings.Fuse_Ticks");
}
@ -54,22 +56,6 @@ public class EnchantBomber extends IEnchantChanceTemplate implements BowEnchant
return (int) this.fuseTicks.getValue(level);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.ENDER_BOW);
this.addConflict(EnchantRegister.GHAST);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(Enchantment.ARROW_FIRE);
this.addConflict(Enchantment.ARROW_DAMAGE);
this.addConflict(Enchantment.ARROW_KNOCKBACK);
}
@Override
@NotNull
public EnchantmentTarget getItemTarget() {

View File

@ -14,7 +14,6 @@ import su.nexmedia.engine.utils.NumberUtil;
import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantBowTemplate;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
import java.util.function.UnaryOperator;
@ -26,24 +25,18 @@ public class EnchantDragonfireArrows extends IEnchantBowTemplate {
public static final String PLACEHOLDER_FIRE_RADIUS = "%enchantment_fire_radius%";
public static final String PLACEHOLDER_FIRE_DURATION = "%enchantment_fire_duration%";
private final EnchantScaler fireDuration;
private final EnchantScaler fireRadius;
private EnchantScaler fireDuration;
private EnchantScaler fireRadius;
public EnchantDragonfireArrows(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
this.fireDuration = new EnchantScaler(this, "Settings.Fire.Duration");
this.fireRadius = new EnchantScaler(this, "Settings.Fire.Radius");
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
public void loadConfig() {
super.loadConfig();
this.fireDuration = new EnchantScaler(this, "Settings.Fire.Duration");
this.fireRadius = new EnchantScaler(this, "Settings.Fire.Radius");
}
@Override

View File

@ -14,7 +14,6 @@ import su.nexmedia.engine.utils.LocationUtil;
import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantBowTemplate;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
public class EnchantElectrifiedArrows extends IEnchantBowTemplate {
@ -24,16 +23,6 @@ public class EnchantElectrifiedArrows extends IEnchantBowTemplate {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
}
@Override
public boolean use(@NotNull ProjectileHitEvent e, @NotNull Projectile projectile, @NotNull ItemStack bow, int level) {
if (!super.use(e, projectile, bow, level)) return false;

View File

@ -1,6 +1,5 @@
package su.nightexpress.excellentenchants.manager.enchants.bow;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.EnderPearl;
import org.bukkit.entity.LivingEntity;
@ -15,7 +14,6 @@ import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.BowEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
public class EnchantEnderBow extends IEnchantChanceTemplate implements BowEnchant {
@ -25,22 +23,6 @@ public class EnchantEnderBow extends IEnchantChanceTemplate implements BowEnchan
super(plugin, cfg, EnchantPriority.HIGHEST);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.BOMBER);
this.addConflict(EnchantRegister.GHAST);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(Enchantment.ARROW_FIRE);
this.addConflict(Enchantment.ARROW_DAMAGE);
this.addConflict(Enchantment.ARROW_KNOCKBACK);
}
@Override
@NotNull
public EnchantmentTarget getItemTarget() {

View File

@ -18,17 +18,16 @@ import su.nexmedia.engine.utils.NumberUtil;
import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantBowTemplate;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
import java.util.function.UnaryOperator;
public class EnchantExplosiveArrows extends IEnchantBowTemplate {
private final boolean explosionFireSpread;
private final boolean explosionDamageItems;
private final boolean explosionDamageBlocks;
private final Scaler explosionSize;
private boolean explosionFireSpread;
private boolean explosionDamageItems;
private boolean explosionDamageBlocks;
private Scaler explosionSize;
public static final String ID = "explosive_arrows";
public static final String PLACEHOLDER_EXPLOSION_POWER = "%enchantment_explosion_power%";
@ -37,6 +36,11 @@ public class EnchantExplosiveArrows extends IEnchantBowTemplate {
public EnchantExplosiveArrows(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.explosionFireSpread = cfg.getBoolean("Settings.Explosion.Fire_Spread");
this.explosionDamageItems = cfg.getBoolean("Settings.Explosion.Damage_Items");
this.explosionDamageBlocks = cfg.getBoolean("Settings.Explosion.Damage_Blocks");
@ -52,16 +56,6 @@ public class EnchantExplosiveArrows extends IEnchantBowTemplate {
this.cfg.addMissing("Settings.Explosion.Damage_Blocks", false);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
}
@Override
@NotNull
public UnaryOperator<String> replacePlaceholders(int level) {

View File

@ -17,19 +17,22 @@ import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.BowEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
public class EnchantGhast extends IEnchantChanceTemplate implements BowEnchant {
private final boolean fireSpread;
private final Scaler yield;
private boolean fireSpread;
private Scaler yield;
public static final String ID = "ghast";
public EnchantGhast(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.HIGHEST);
}
@Override
public void loadConfig() {
super.loadConfig();
this.fireSpread = cfg.getBoolean("Settings.Fire_Spread");
this.yield = new EnchantScaler(this, "Settings.Yield");
}
@ -42,21 +45,6 @@ public class EnchantGhast extends IEnchantChanceTemplate implements BowEnchant {
cfg.addMissing("Settings.Yield", "1.0 * " + PLACEHOLDER_LEVEL);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.BOMBER);
this.addConflict(EnchantRegister.ENDER_BOW);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(Enchantment.ARROW_FIRE);
this.addConflict(Enchantment.ARROW_KNOCKBACK);
}
public boolean isFireSpread() {
return fireSpread;
}

View File

@ -6,7 +6,6 @@ import su.nexmedia.engine.api.config.JYML;
import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantBowPotionTemplate;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
public class EnchantPoisonedArrows extends IEnchantBowPotionTemplate {
@ -15,14 +14,4 @@ public class EnchantPoisonedArrows extends IEnchantBowPotionTemplate {
public EnchantPoisonedArrows(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM, PotionEffectType.POISON);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.WITHERED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
}
}

View File

@ -6,7 +6,6 @@ import su.nexmedia.engine.api.config.JYML;
import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantBowPotionTemplate;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
public class EnchantWitheredArrows extends IEnchantBowPotionTemplate {
@ -15,14 +14,4 @@ public class EnchantWitheredArrows extends IEnchantBowPotionTemplate {
public EnchantWitheredArrows(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM, PotionEffectType.WITHER);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.CONFUSING_ARROWS);
this.addConflict(EnchantRegister.POISONED_ARROWS);
this.addConflict(EnchantRegister.EXPLOSIVE_ARROWS);
this.addConflict(EnchantRegister.ELECTRIFIED_ARROWS);
this.addConflict(EnchantRegister.DRAGONFIRE_ARROWS);
}
}

View File

@ -30,8 +30,8 @@ import java.util.function.UnaryOperator;
public class EnchantBlastMining extends IEnchantChanceTemplate implements BlockBreakEnchant {
private final Scaler explosionPower;
private final Scaler minBlockStrength;
private Scaler explosionPower;
private Scaler minBlockStrength;
public static final String ID = "blast_mining";
public static final String PLACEHOLDER_EXPLOSION_POWER = "%enchantment_explosion_power%";
@ -41,7 +41,11 @@ public class EnchantBlastMining extends IEnchantChanceTemplate implements BlockB
public EnchantBlastMining(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.explosionPower = new EnchantScaler(this, "Settings.Explosion.Power");
this.minBlockStrength = new EnchantScaler(this, "Settings.Min_Block_Strength");
}
@ -66,13 +70,6 @@ public class EnchantBlastMining extends IEnchantChanceTemplate implements BlockB
cfg.addMissing("Settings.Min_Block_Strength", "1.5 - " + PLACEHOLDER_LEVEL + " / 10.0");
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.TUNNEL);
this.addConflict(EnchantRegister.VEINMINER);
}
@Override
@NotNull
public UnaryOperator<String> replacePlaceholders(int level) {
@ -81,11 +78,6 @@ public class EnchantBlastMining extends IEnchantChanceTemplate implements BlockB
);
}
/*@Override
public boolean isFitItemType(@NotNull ItemStack item) {
return ItemUtil.isPickaxe(item);
}*/
@Override
@NotNull
public FitItemType[] getFitItemTypes() {

View File

@ -1,6 +1,5 @@
package su.nightexpress.excellentenchants.manager.enchants.tool;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -20,14 +19,18 @@ import java.util.function.UnaryOperator;
public class EnchantCurseOfBreaking extends IEnchantChanceTemplate {
private final Scaler durabilityAmount;
private Scaler durabilityAmount;
public static final String ID = "curse_of_breaking";
public static final String PLACEHOLDER_DURABILITY_AMOUNT = "%enchantment_durability_amount%";
public EnchantCurseOfBreaking(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.durabilityAmount = new EnchantScaler(this, "Settings.Durability_Amount");
}
@ -40,12 +43,6 @@ public class EnchantCurseOfBreaking extends IEnchantChanceTemplate {
return (int) this.durabilityAmount.getValue(level);
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(Enchantment.DURABILITY);
}
@Override
@NotNull
public UnaryOperator<String> replacePlaceholders(int level) {

View File

@ -17,13 +17,17 @@ import su.nightexpress.excellentenchants.manager.type.FitItemType;
public class EnchantCurseOfMisfortune extends IEnchantChanceTemplate implements BlockBreakEnchant, DeathEnchant {
private final boolean dropExp;
private boolean dropExp;
public static final String ID = "curse_of_misfortune";
public EnchantCurseOfMisfortune(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.LOWEST);
}
@Override
public void loadConfig() {
super.loadConfig();
this.dropExp = cfg.getBoolean("Settings.Drop_Exp");
}
@ -31,13 +35,6 @@ public class EnchantCurseOfMisfortune extends IEnchantChanceTemplate implements
return dropExp;
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(LOOT_BONUS_BLOCKS);
this.addConflict(LOOT_BONUS_MOBS);
}
@Override
@NotNull
public FitItemType[] getFitItemTypes() {

View File

@ -27,7 +27,6 @@ import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.BlockBreakEnchant;
import su.nightexpress.excellentenchants.api.enchantment.type.CustomDropEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.type.FitItemType;
public class EnchantDivineTouch extends IEnchantChanceTemplate implements BlockBreakEnchant, CustomDropEnchant {
@ -35,13 +34,17 @@ public class EnchantDivineTouch extends IEnchantChanceTemplate implements BlockB
public static final String ID = "divine_touch";
private static final String META_HANDLE = ID + "_handle";
private final String particleName;
private final String particleData;
private final String spawnerName;
private String particleName;
private String particleData;
private String spawnerName;
public EnchantDivineTouch(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", Particle.VILLAGER_HAPPY.name());
this.particleData = cfg.getString("Settings.Particle.Data", "");
this.spawnerName = StringUtil.color(cfg.getString("Settings.Spawner_Item.Name", "&aMob Spawner &7(%type%)"));
@ -62,12 +65,6 @@ public class EnchantDivineTouch extends IEnchantChanceTemplate implements BlockB
return new FitItemType[]{FitItemType.PICKAXE};
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.SMELTER);
}
@Override
@NotNull
public EnchantmentTarget getItemTarget() {

View File

@ -19,7 +19,7 @@ import java.util.function.UnaryOperator;
public class EnchantLuckyMiner extends IEnchantChanceTemplate implements BlockBreakEnchant {
private final Scaler expModifier;
private Scaler expModifier;
public static final String ID = "lucky_miner";
@ -27,6 +27,11 @@ public class EnchantLuckyMiner extends IEnchantChanceTemplate implements BlockBr
public EnchantLuckyMiner(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.expModifier = new EnchantScaler(this, "Settings.Exp_Modifier");
}

View File

@ -28,8 +28,8 @@ import java.util.Set;
public class EnchantReplanter extends IEnchantChanceTemplate implements InteractEnchant, BlockBreakEnchant {
private final boolean replantOnRightClick;
private final boolean replantOnPlantBreak;
private boolean replantOnRightClick;
private boolean replantOnPlantBreak;
public static final String ID = "replanter";
@ -39,7 +39,11 @@ public class EnchantReplanter extends IEnchantChanceTemplate implements Interact
public EnchantReplanter(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.HIGH);
}
@Override
public void loadConfig() {
super.loadConfig();
this.replantOnRightClick = cfg.getBoolean("Settings.Replant.On_Right_Click");
this.replantOnPlantBreak = cfg.getBoolean("Settings.Replant.On_Plant_Break");
}

View File

@ -36,20 +36,26 @@ import java.util.TreeMap;
public class EnchantSilkChest extends IEnchantChanceTemplate implements CustomDropEnchant {
private final Map<Integer, NamespacedKey> keyItems;
private final String chestName;
private String chestName;
public static final String ID = "silk_chest";
public EnchantSilkChest(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.HIGH);
this.keyItems = new TreeMap<>();
this.chestName = StringUtil.color(cfg.getString("Settings.Chest_Item.Name", "%name% &7(%items% items)"));
for (int pos = 0; pos < 27; pos++) {
this.getItemKey(pos);
}
}
@Override
public void loadConfig() {
super.loadConfig();
this.chestName = StringUtil.color(cfg.getString("Settings.Chest_Item.Name", "%name% &7(%items% items)"));
}
@Override
protected void updateConfig() {
super.updateConfig();
@ -139,6 +145,9 @@ public class EnchantSilkChest extends IEnchantChanceTemplate implements CustomDr
BlockState state = block.getState();
if (!(state instanceof Chest chest)) return;
chest.setCustomName(null);
chest.update(true);
Inventory inventory = chest.getBlockInventory();
for (int pos = 0; pos < inventory.getSize(); pos++) {
String data = PDCUtil.getStringData(item, this.getItemKey(pos));

View File

@ -1,8 +1,10 @@
package su.nightexpress.excellentenchants.manager.enchants.tool;
import org.bukkit.*;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockDropItemEvent;
@ -16,7 +18,6 @@ import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.BlockDropEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.type.FitItemType;
import java.util.HashMap;
@ -26,14 +27,18 @@ public class EnchantSmelter extends IEnchantChanceTemplate implements BlockDropE
public static final String ID = "smelter";
private final Sound sound;
private final String particleName;
private final String particleData;
private final Map<Material, Material> smeltingTable;
private Sound sound;
private String particleName;
private String particleData;
private Map<Material, Material> smeltingTable;
public EnchantSmelter(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.sound = cfg.getEnum("Settings.Sound", Sound.class);
this.particleName = cfg.getString("Settings.Particle.Name", Particle.FLAME.name());
this.particleData = cfg.getString("Settings.Particle.Data", "");
@ -70,12 +75,12 @@ public class EnchantSmelter extends IEnchantChanceTemplate implements BlockDropE
return new FitItemType[]{FitItemType.PICKAXE, FitItemType.AXE, FitItemType.SHOVEL};
}
@Override
/*@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(Enchantment.SILK_TOUCH);
this.addConflict(EnchantRegister.DIVINE_TOUCH);
}
}*/
@Override
@NotNull

View File

@ -26,15 +26,19 @@ import java.util.function.UnaryOperator;
public class EnchantTelekinesis extends IEnchantChanceTemplate implements CustomDropEnchant {
private final LangMessage messageDropReceived;
private final String messageItemName;
private final String messageItemSeparator;
private LangMessage messageDropReceived;
private String messageItemName;
private String messageItemSeparator;
public static final String ID = "telekinesis";
public EnchantTelekinesis(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.LOWEST);
}
@Override
public void loadConfig() {
super.loadConfig();
this.messageDropReceived = new LangMessage(plugin, cfg.getString("Settings.Message.Drop_Received", ""));
this.messageItemName = StringUtil.color(cfg.getString("Settings.Message.Item_Name", "&7x%item_amount% &f%item_name%"));
this.messageItemSeparator = StringUtil.color(cfg.getString("Settings.Message.Item_Separator", "&7, "));

View File

@ -31,10 +31,10 @@ import java.util.function.Predicate;
public class EnchantTreasures extends IEnchantChanceTemplate implements CustomDropEnchant, ICleanable {
private final String particleName;
private final String particleData;
private final Sound sound;
private final Map<Material, Map<Material, Double>> treasures;
private String particleName;
private String particleData;
private Sound sound;
private Map<Material, Map<Material, Double>> treasures;
private final Predicate<Block> blockTracker;
public static final String ID = "treasures";
@ -42,6 +42,15 @@ public class EnchantTreasures extends IEnchantChanceTemplate implements CustomDr
public EnchantTreasures(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
PlayerBlockTracker.initialize();
PlayerBlockTracker.BLOCK_FILTERS.add(this.blockTracker = (block) -> {
return this.getTreasure(block.getType()) != null;
});
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", Particle.REDSTONE.name());
this.particleData = cfg.getString("Settings.Particle.Data", "200,180,0");
this.sound = cfg.getEnum("Settings.Sound", Sound.class, Sound.BLOCK_NOTE_BLOCK_BELL);
@ -68,11 +77,6 @@ public class EnchantTreasures extends IEnchantChanceTemplate implements CustomDr
this.treasures.put(mFrom, treasuresList);
}
}
PlayerBlockTracker.initialize();
PlayerBlockTracker.BLOCK_FILTERS.add(this.blockTracker = (block) -> {
return this.getTreasure(block.getType()) != null;
});
}
@Override

View File

@ -26,7 +26,7 @@ import java.util.Set;
public class EnchantTunnel extends IEnchantChanceTemplate implements BlockBreakEnchant {
private final boolean disableOnSneak;
private boolean disableOnSneak;
public static final String ID = "tunnel";
private static final String META_BLOCK_TUNNEL = ID + "_block_tunneled";
@ -41,6 +41,11 @@ public class EnchantTunnel extends IEnchantChanceTemplate implements BlockBreakE
public EnchantTunnel(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.HIGH);
}
@Override
public void loadConfig() {
super.loadConfig();
this.disableOnSneak = cfg.getBoolean("Settings.Ignore_When_Sneaking");
}
@ -49,14 +54,6 @@ public class EnchantTunnel extends IEnchantChanceTemplate implements BlockBreakE
super.updateConfig();
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.VEINMINER);
this.addConflict(EnchantRegister.BLAST_MINING);
}
@Override
@NotNull
public FitItemType[] getFitItemTypes() {

View File

@ -32,8 +32,8 @@ import java.util.stream.Stream;
public class EnchantVeinminer extends IEnchantChanceTemplate implements BlockBreakEnchant {
private final Scaler blocksLimit;
private final Set<Material> blocksAffected;
private Scaler blocksLimit;
private Set<Material> blocksAffected;
public static final String ID = "veinminer";
@ -43,17 +43,14 @@ public class EnchantVeinminer extends IEnchantChanceTemplate implements BlockBre
public EnchantVeinminer(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.HIGH);
this.blocksLimit = new EnchantScaler(this, "Settings.Blocks.Max_At_Once");
this.blocksAffected = cfg.getStringSet("Settings.Blocks.Affected").stream()
.map(type -> Material.getMaterial(type.toUpperCase())).filter(Objects::nonNull).collect(Collectors.toSet());
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.TUNNEL);
this.addConflict(EnchantRegister.BLAST_MINING);
public void loadConfig() {
super.loadConfig();
this.blocksLimit = new EnchantScaler(this, "Settings.Blocks.Max_At_Once");
this.blocksAffected = cfg.getStringSet("Settings.Blocks.Affected").stream()
.map(type -> Material.getMaterial(type.toUpperCase())).filter(Objects::nonNull).collect(Collectors.toSet());
}
@NotNull

View File

@ -2,7 +2,6 @@ package su.nightexpress.excellentenchants.manager.enchants.weapon;
import com.google.common.collect.Sets;
import org.bukkit.Particle;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
@ -17,7 +16,6 @@ import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.CombatEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
import java.util.Set;
@ -25,10 +23,10 @@ import java.util.function.UnaryOperator;
public class EnchantBaneOfNetherspawn extends IEnchantChanceTemplate implements CombatEnchant {
private final String particleName;
private final String particleData;
private final boolean damageModifier;
private final Scaler damageFormula;
private String particleName;
private String particleData;
private boolean damageModifier;
private Scaler damageFormula;
private final Set<EntityType> entityTypes;
public static final String ID = "bane_of_netherspawn";
@ -38,11 +36,6 @@ public class EnchantBaneOfNetherspawn extends IEnchantChanceTemplate implements
public EnchantBaneOfNetherspawn(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
this.particleName = cfg.getString("Settings.Particle.Name", "");
this.particleData = cfg.getString("Settings.Particle.Data", "");
this.damageModifier = cfg.getBoolean("Settings.Damage.As_Modifier");
this.damageFormula = new EnchantScaler(this, "Settings.Damage.Formula");
this.entityTypes = Sets.newHashSet(EntityType.BLAZE, EntityType.MAGMA_CUBE,
EntityType.WITHER_SKELETON, EntityType.GHAST, EntityType.WITHER);
@ -54,6 +47,15 @@ public class EnchantBaneOfNetherspawn extends IEnchantChanceTemplate implements
this.entityTypes.add(EntityType.ZOMBIFIED_PIGLIN);
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", "");
this.particleData = cfg.getString("Settings.Particle.Data", "");
this.damageModifier = cfg.getBoolean("Settings.Damage.As_Modifier");
this.damageFormula = new EnchantScaler(this, "Settings.Damage.Formula");
}
public double getDamageModifier(int level) {
return this.damageFormula.getValue(level);
}
@ -67,15 +69,6 @@ public class EnchantBaneOfNetherspawn extends IEnchantChanceTemplate implements
cfg.addMissing("Settings.Particle.Data", "");
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.VILLAGE_DEFENDER);
this.addConflict(Enchantment.DAMAGE_ARTHROPODS);
this.addConflict(Enchantment.DAMAGE_UNDEAD);
this.addConflict(Enchantment.DAMAGE_ALL);
}
@Override
@NotNull
public UnaryOperator<String> replacePlaceholders(int level) {

View File

@ -20,9 +20,9 @@ import java.util.Set;
public class EnchantCure extends IEnchantChanceTemplate implements CombatEnchant {
private final Sound sound;
private final String particleName;
private final String particleData;
private Sound sound;
private String particleName;
private String particleData;
public static final String ID = "cure";
@ -30,7 +30,11 @@ public class EnchantCure extends IEnchantChanceTemplate implements CombatEnchant
public EnchantCure(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.sound = cfg.getEnum("Settings.Sound", Sound.class);
this.particleName = cfg.getString("Settings.Particle.Name", Particle.CLOUD.name());
this.particleData = cfg.getString("Settings.Particle.Data", "");
@ -61,19 +65,15 @@ public class EnchantCure extends IEnchantChanceTemplate implements CombatEnchant
e.setCancelled(true);
EffectUtil.playEffect(victim.getLocation(), this.particleName, this.particleData, 0.25, 0.25, 0.25, 0.1f, 20);
if (this.sound != null) MessageUtil.sound(victim.getLocation(), this.sound);
MessageUtil.sound(victim.getLocation(), this.sound);
if (victim instanceof PigZombie pigZombie) {
victim.getWorld().spawn(victim.getLocation(), Piglin.class);
victim.remove();
}
else if (victim instanceof ZombieVillager zombieVillager) {
Villager.Profession profession = zombieVillager.getVillagerProfession();
Villager villager = victim.getWorld().spawn(victim.getLocation(), Villager.class);
if (profession != null) {
villager.setProfession(profession);
}
zombieVillager.setConversionTime(1);
}
victim.remove();
return true;
}
}

View File

@ -36,6 +36,11 @@ public class EnchantCutter extends IEnchantChanceTemplate implements CombatEncha
public EnchantCutter(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.LOWEST);
}
@Override
public void loadConfig() {
super.loadConfig();
this.durabilityReduction = new EnchantScaler(this, "Settings.Item.Durability_Reduction");
this.sound = cfg.getEnum("Settings.Item.Sound", Sound.class);
}

View File

@ -26,17 +26,21 @@ import java.util.stream.Collectors;
public class EnchantDecapitator extends IEnchantChanceTemplate implements DeathEnchant {
private final String particleName;
private final String particleData;
private final Set<String> ignoredEntityTypes;
private final String headName;
private final Map<String, String> headTextures;
private String particleName;
private String particleData;
private Set<String> ignoredEntityTypes;
private String headName;
private Map<String, String> headTextures;
public static final String ID = "decapitator";
public EnchantDecapitator(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", Particle.BLOCK_CRACK.name());
this.particleData = cfg.getString("Settings.Particle.Data", Material.REDSTONE_BLOCK.name());
this.ignoredEntityTypes = cfg.getStringSet("Settings.Ignored_Entity_Types").stream().map(String::toUpperCase).collect(Collectors.toSet());

View File

@ -17,15 +17,19 @@ import su.nightexpress.excellentenchants.api.enchantment.type.CombatEnchant;
public class EnchantDoubleStrike extends IEnchantChanceTemplate implements CombatEnchant {
private final String particleName;
private final String particleData;
private final Sound sound;
private String particleName;
private String particleData;
private Sound sound;
public static final String ID = "double_strike";
public EnchantDoubleStrike(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.LOW);
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", Particle.EXPLOSION_NORMAL.name());
this.particleData = cfg.getString("Settings.Particle.Data", "");
this.sound = cfg.getEnum("Settings.Sound", Sound.class);

View File

@ -18,13 +18,18 @@ import java.util.function.UnaryOperator;
public class EnchantExpHunter extends IEnchantChanceTemplate implements DeathEnchant {
private final Scaler expModifier;
private Scaler expModifier;
public static final String ID = "exp_hunter";
public static final String PLACEHOLDER_EXP_MODIFIER = "%enchantment_exp_modifier%";
public EnchantExpHunter(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.expModifier = new EnchantScaler(this, "Settings.Exp_Modifier");
}

View File

@ -22,14 +22,18 @@ import java.util.function.UnaryOperator;
public class EnchantInfernus extends IEnchantChanceTemplate {
private final Scaler fireTicks;
private Scaler fireTicks;
public static final String ID = "infernus";
public static final String PLACEHOLDER_FIRE_DURATION = "%enchantment_fire_duration%";
public EnchantInfernus(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.fireTicks = new EnchantScaler(this, "Settings.Fire_Ticks");
}

View File

@ -20,12 +20,17 @@ import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
public class EnchantRocket extends IEnchantChanceTemplate implements CombatEnchant {
private final Scaler fireworkPower;
private Scaler fireworkPower;
public static final String ID = "rocket";
public EnchantRocket(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.fireworkPower = new EnchantScaler(this, "Settings.Firework_Power");
}

View File

@ -23,12 +23,17 @@ import java.util.Map;
public class EnchantScavenger extends IEnchantChanceTemplate implements DeathEnchant {
private final Map<EntityType, Map<Material, Map.Entry<int[], Double>>> loot;
private Map<EntityType, Map<Material, Map.Entry<int[], Double>>> loot;
public static final String ID = "scavenger";
public EnchantScavenger(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.loot = new HashMap<>();
for (String eId : cfg.getSection("Settings.Treasures")) {

View File

@ -24,13 +24,17 @@ public class EnchantTemper extends IEnchantChanceTemplate implements CombatEncha
public static final String PLACEHOLDER_DAMAGE_CAPACITY = "%enchantment_damage_capacity%";
public static final String PLACEHOLDER_HEALTH_POINT = "%enchantment_health_point%";
private final EnchantScaler damageAmount;
private final EnchantScaler damageCapacity;
private final EnchantScaler healthPoint;
private EnchantScaler damageAmount;
private EnchantScaler damageCapacity;
private EnchantScaler healthPoint;
public EnchantTemper(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.damageAmount = new EnchantScaler(this, "Settings.Damage.Amount");
this.damageCapacity = new EnchantScaler(this, "Settings.Damage.Capacity");
this.healthPoint = new EnchantScaler(this, "Settings.Health.Point");
@ -82,7 +86,7 @@ public class EnchantTemper extends IEnchantChanceTemplate implements CombatEncha
double damageAmount = this.getDamageAmount(level);
double damageCap = this.getDamageCapacity(level);
double damageFinal = Math.min(damageCap, damageAmount * pointAmount);
double damageFinal = Math.min(damageCap, 1D + damageAmount * pointAmount);
e.setDamage(e.getDamage() * damageFinal);
return true;

View File

@ -24,8 +24,8 @@ import java.util.stream.Collectors;
public class EnchantThrifty extends IEnchantChanceTemplate implements DeathEnchant {
private final Set<String> ignoredEntityTypes;
private final Set<String> ignoredSpawnReasons;
private Set<String> ignoredEntityTypes;
private Set<String> ignoredSpawnReasons;
private final NamespacedKey keyEntityIgnored;
public static final String ID = "thrifty";
@ -33,7 +33,11 @@ public class EnchantThrifty extends IEnchantChanceTemplate implements DeathEncha
public EnchantThrifty(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
this.keyEntityIgnored = new NamespacedKey(plugin, ID + "_ignored");
}
@Override
public void loadConfig() {
super.loadConfig();
this.ignoredEntityTypes = cfg.getStringSet("Settings.Ignored_Entity_Types").stream().map(String::toUpperCase).collect(Collectors.toSet());
this.ignoredSpawnReasons = cfg.getStringSet("Settings.Ignored_Spawn_Reasons").stream().map(String::toUpperCase).collect(Collectors.toSet());
}

View File

@ -13,13 +13,17 @@ import su.nightexpress.excellentenchants.api.enchantment.type.CombatEnchant;
public class EnchantThunder extends IEnchantChanceTemplate implements CombatEnchant {
private final boolean inThunderstormOnly;
private boolean inThunderstormOnly;
public static final String ID = "thunder";
public EnchantThunder(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.inThunderstormOnly = cfg.getBoolean("Settings.During_Thunderstorm_Only");
}

View File

@ -23,17 +23,21 @@ import java.util.function.UnaryOperator;
public class EnchantVampire extends IEnchantChanceTemplate implements CombatEnchant {
private final String particleName;
private final String particleData;
private final Scaler healAmount;
private final boolean healMultiplier;
private String particleName;
private String particleData;
private Scaler healAmount;
private boolean healMultiplier;
public static final String ID = "vampire";
public static final String PLACEHOLDER_HEAL_AMOUNT = "%enchantment_heal_amount%";
public EnchantVampire(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.LOWEST);
}
@Override
public void loadConfig() {
super.loadConfig();
this.particleName = cfg.getString("Settings.Particle.Name", Particle.HEART.name());
this.particleData = cfg.getString("Settings.Particle.Data", "");
this.healAmount = new EnchantScaler(this, "Settings.Heal.Amount");

View File

@ -1,7 +1,6 @@
package su.nightexpress.excellentenchants.manager.enchants.weapon;
import org.bukkit.Particle;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.Illager;
import org.bukkit.entity.LivingEntity;
@ -16,24 +15,27 @@ import su.nightexpress.excellentenchants.ExcellentEnchants;
import su.nightexpress.excellentenchants.api.enchantment.EnchantPriority;
import su.nightexpress.excellentenchants.api.enchantment.IEnchantChanceTemplate;
import su.nightexpress.excellentenchants.api.enchantment.type.CombatEnchant;
import su.nightexpress.excellentenchants.manager.EnchantRegister;
import su.nightexpress.excellentenchants.manager.object.EnchantScaler;
import java.util.function.UnaryOperator;
public class EnchantVillageDefender extends IEnchantChanceTemplate implements CombatEnchant {
private final boolean damageMultiplier;
private final Scaler damageAmount;
private final String particleName;
private final String particleData;
private boolean damageMultiplier;
private Scaler damageAmount;
private String particleName;
private String particleData;
public static final String ID = "village_defender";
public static final String PLACEHOLDER_DAMAGE_AMOUNT = "%enchantment_damage_amount%";
public EnchantVillageDefender(@NotNull ExcellentEnchants plugin, @NotNull JYML cfg) {
super(plugin, cfg, EnchantPriority.MEDIUM);
}
@Override
public void loadConfig() {
super.loadConfig();
this.damageAmount = new EnchantScaler(this, "Settings.Damage.Formula");
this.damageMultiplier = cfg.getBoolean("Settings.Damage.As_Modifier");
this.particleName = cfg.getString("Settings.Particle.Name", Particle.VILLAGER_ANGRY.name());
@ -65,15 +67,6 @@ public class EnchantVillageDefender extends IEnchantChanceTemplate implements Co
cfg.addMissing("Settings.Particle.Data", "");
}
@Override
protected void addConflicts() {
super.addConflicts();
this.addConflict(EnchantRegister.BANE_OF_NETHERSPAWN);
this.addConflict(Enchantment.DAMAGE_ARTHROPODS);
this.addConflict(Enchantment.DAMAGE_UNDEAD);
this.addConflict(Enchantment.DAMAGE_ALL);
}
@Override
@NotNull
public EnchantmentTarget getItemTarget() {

View File

@ -12,11 +12,13 @@ Tier: exotic
# You can use multiple lines here.
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Grants %enchantment_potion_type% %enchantment_potion_level% effect that costs x1
%enchantment_cost_item%.
- 'Grants %enchantment_potion_type% %enchantment_potion_level% effect that costs x1 %enchantment_cost_item%.'
# Defines if this enchantment is a treasure enchantment.
# Treasure enchantments can only be received via looting, trading, or fishing.
Is_Treasure: false
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,13 @@ Description:
# Defines if this enchantment is a treasure enchantment.
# Treasure enchantments can only be received via looting, trading, or fishing.
Is_Treasure: false
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- village_defender
- sharpness
- smite
- bane_of_arthropods
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,11 @@ Tier: legendary
Description:
- '%enchantment_trigger_chance%% chance to mine blocks by x%enchantment_explosion_power%
power explosion.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- tunnel
- veinminer
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to apply %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -14,6 +14,20 @@ Tier: exotic
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to launch TNT that explodes in %enchantment_fuse_ticks%s.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- ender_bow
- ghast
- explosive_arrows
- withered_arrows
- poisoned_arrows
- dragonfire_arrows
- electrified_arrows
- confusing_arrows
- flame
- power
- punch
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -16,6 +16,9 @@ Tier: common
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Grants permanent %enchantment_potion_type% %enchantment_potion_level%.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: rare
Description:
- '%enchantment_trigger_chance%% chance to apply %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. to attacker.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to launch an arrow with %enchantment_potion_type%
%enchantment_potion_level% (%enchantment_potion_duration%s.)'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to apply %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: exotic
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to cure Zombified Piglins and Zombie Villagers.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,10 @@ Tier: cursed
Description:
- '%enchantment_trigger_chance%% chance the item will consume extra %enchantment_durability_amount%
durability points.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- durability
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,11 @@ Tier: cursed
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to have no drops from blocks or mobs.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- fortune
- looting
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,9 @@ Tier: exotic
Description:
- '%enchantment_trigger_chance%% chance to throw away enemy''s armor and damage it
for %enchantment_durability_damage%%.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: exotic
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to obtain player''s or mob''s head.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,10 @@ Tier: legendary
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to obtain &fMob Spawner&8.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- smelter
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: legendary
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to inflict double damage.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -16,6 +16,14 @@ Tier: exotic
Description:
- '%enchantment_trigger_chance%% chance to launch an dragonfire arrow (R=%enchantment_fire_radius%,
%enchantment_fire_duration%s).'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- confusing_arrows
- poisoned_arrows
- explosive_arrows
- withered_arrows
- electrified_arrows
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,14 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to launch an electrified arrow.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- confusing_arrows
- poisoned_arrows
- explosive_arrows
- withered_arrows
- dragonfire_arrows
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,20 @@ Tier: legendary
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to shoot Ender Pearl instead of arrows.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- bomber
- ghast
- explosive_arrows
- withered_arrows
- poisoned_arrows
- dragonfire_arrows
- electrified_arrows
- confusing_arrows
- flame
- power
- punch
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to apply %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,9 @@ Tier: rare
Description:
- '%enchantment_trigger_chance%% chance to obtain +%enchantment_exp_modifier%% more
exp from mobs.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,14 @@ Tier: exotic
Description:
- '%enchantment_trigger_chance%% chance to launch an explosive arrow with x%enchantment_explosion_power%
power.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- confusing_arrows
- poisoned_arrows
- dragonfire_arrows
- withered_arrows
- electrified_arrows
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,10 @@ Tier: exotic
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Ability to walk on lava and on magma blocks without getting damage.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- frost_walker
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,19 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to launch a fireball instead of arrow.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- ender_bow
- bomber
- explosive_arrows
- withered_arrows
- poisoned_arrows
- dragonfire_arrows
- electrified_arrows
- confusing_arrows
- flame
- punch
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: rare
Description:
- '%enchantment_trigger_chance%% chance to obtain %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. when damaged.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -16,6 +16,9 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Grants %enchantment_potion_type% %enchantment_potion_level% effect.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to launch an arrow with %enchantment_potion_type%
%enchantment_potion_level% (%enchantment_potion_duration%s.)'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to freeze and apply %enchantment_potion_type%
%enchantment_potion_level% for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to launch flaming Trident that ignites the
enemy for %enchantment_fire_duration%s.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,9 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to obtain +%enchantment_exp_modifier%% more
exp from ores.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: rare
Description:
- Grants %enchantment_potion_type% %enchantment_potion_level% effect that costs x1
%enchantment_cost_item%.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -20,6 +20,9 @@ Level:
# Maximal (final) enchantment level.
# Keep in mind that while you can enchant items with bypass max. enchantment level, all enchantment 'Scalable' option values will not exceed the max. enchantment level.
Max: 1
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment settings for Anvil.
Anvil:
# Defines the exp cost to merge this enchantment on other items on anvil.

View File

@ -17,6 +17,9 @@ Tier: rare
Description:
- '%enchantment_trigger_chance%% chance to apply %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,14 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to launch an arrow with %enchantment_potion_type%
%enchantment_potion_level% (%enchantment_potion_duration%s.)'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- confusing_arrows
- dragonfire_arrows
- explosive_arrows
- withered_arrows
- electrified_arrows
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: rare
Description:
- '%enchantment_trigger_chance%% chance to get %enchantment_potion_type% %enchantment_potion_level%
effect for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -16,6 +16,9 @@ Tier: exotic
Description:
- Restores %enchantment_health_amount% hearts every %enchantment_health_interval%s.
with %enchantment_trigger_chance%% chance.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -20,6 +20,9 @@ Level:
# Maximal (final) enchantment level.
# Keep in mind that while you can enchant items with bypass max. enchantment level, all enchantment 'Scalable' option values will not exceed the max. enchantment level.
Max: 1
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment settings for Anvil.
Anvil:
# Defines the exp cost to merge this enchantment on other items on anvil.

View File

@ -20,6 +20,9 @@ Level:
# Maximal (final) enchantment level.
# Keep in mind that while you can enchant items with bypass max. enchantment level, all enchantment 'Scalable' option values will not exceed the max. enchantment level.
Max: 3
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment settings for Anvil.
Anvil:
# Defines the exp cost to merge this enchantment on other items on anvil.

View File

@ -16,6 +16,9 @@ Tier: rare
Description:
- Restores %enchantment_saturation_amount% food points every %enchantment_saturation_interval%s.
with %enchantment_trigger_chance%% chance.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: common
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to obtain additional loot from mobs.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,9 @@ Tier: exotic
Description:
- '%enchantment_trigger_chance%% chance to create an x%enchantment_explosion_power%
power explosion on death.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Drop chests and saves all its content.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to smelt ore or a block on mining.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -16,6 +16,9 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Grants %enchantment_potion_type% %enchantment_potion_level% effect.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: exotic
Description:
- '%enchantment_trigger_chance%% chance to apply random potion effect to enemy on
hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: exotic
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Moves all blocks loot directly to your inventory.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -18,6 +18,9 @@ Description:
- '%enchantment_trigger_chance%% chance to inflict %enchantment_damage_amount%% (max.
%enchantment_damage_capacity%%) more damage for each %enchantment_health_point%
hearts missing.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: exotic
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to obtain mob Spawn Egg on kill.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to summon lightning to enemy on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,9 @@ Tier: common
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- '%enchantment_trigger_chance%% chance to attempt to find a treasure in mined block.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -13,6 +13,11 @@ Tier: legendary
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Allows you to mine multiple blocks at once in a shape.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- veinminer
- blast_mining
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,9 @@ Tier: exotic
Description:
- '%enchantment_trigger_chance%% chance to heal yourself for %enchantment_heal_amount%
heart(s) on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -14,6 +14,11 @@ Tier: rare
# You can use 'Enchantment' placeholders: http://77.222.60.131:8080/plugin/excellentenchants/utils/placeholders
Description:
- Mines up to %enchantment_block_limit% blocks of the ore vein at once.
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- blast_mining
- tunnel
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -17,6 +17,9 @@ Tier: rare
Description:
- '%enchantment_trigger_chance%% chance to apply %enchantment_potion_type% %enchantment_potion_level%
for %enchantment_potion_duration%s. on hit.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts: []
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

View File

@ -15,6 +15,13 @@ Tier: common
Description:
- '%enchantment_trigger_chance%% chance to inflict %enchantment_damage_amount% more
damage on Pillagers.'
# List of the conflicting enchantments.
# Conflicted enchantments can not be applied together on the same item.
Conflicts:
- bane_of_netherspawn
- sharpness
- smite
- bane_of_arthropods
# Enchantment level settings.
Level:
# Minimal (start) enchantment level. Can not be smaller then 1.

Some files were not shown because too many files have changed in this diff Show More