Merge branch 'development'
This commit is contained in:
commit
ef5a39f404
6
pom.xml
6
pom.xml
|
@ -2,7 +2,7 @@
|
|||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicEnchants</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>1.1.3</version>
|
||||
<version>1.1.4</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicEnchants-${project.version}</finalName>
|
||||
|
@ -80,6 +80,10 @@
|
|||
<id>private</id>
|
||||
<url>http://repo.songoda.com/artifactory/private/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<url>http://repo.songoda.com/artifactory/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.songoda.epicenchants.utils.Tuple;
|
|||
import com.songoda.epicenchants.utils.itemnbtapi.NBTItem;
|
||||
import com.songoda.epicenchants.utils.single.GeneralUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -16,6 +17,7 @@ import org.bukkit.inventory.ItemStack;
|
|||
import java.util.Optional;
|
||||
|
||||
import static com.songoda.epicenchants.enums.EnchantResult.*;
|
||||
import static java.util.concurrent.ThreadLocalRandom.current;
|
||||
|
||||
public class BookListener extends ItemListener {
|
||||
public BookListener(EpicEnchants instance) {
|
||||
|
@ -37,6 +39,16 @@ public class BookListener extends ItemListener {
|
|||
return;
|
||||
}
|
||||
|
||||
// get total amount of enchantments on item
|
||||
int currentEnchantmentTotal = instance.getEnchantUtils().getEnchants(toApply).size();
|
||||
int maxAllowedApply = instance.getEnchantUtils().getMaximumEnchantsCanApply((Player) event.getWhoClicked());
|
||||
|
||||
// item is at max enchantments
|
||||
if (currentEnchantmentTotal >= maxAllowedApply) {
|
||||
instance.getLocale().getMessage("enchants.maxallowed").processPlaceholder("max_enchants", maxAllowedApply).sendPrefixedMessage(event.getWhoClicked());
|
||||
return;
|
||||
}
|
||||
|
||||
int level = cursor.getInteger("level");
|
||||
int successRate = cursor.getInteger("success-rate");
|
||||
int destroyRate = cursor.getInteger("destroy-rate");
|
||||
|
@ -85,13 +97,16 @@ public class BookListener extends ItemListener {
|
|||
throw new IllegalStateException("The " + group.getName() + " group does not have any enchants.");
|
||||
}
|
||||
|
||||
int level = current().nextInt(enchant.get().getMaxLevel()) + 1;
|
||||
|
||||
useItem(event);
|
||||
event.getPlayer().getInventory().addItem(enchant.get().getBook().get(enchant.get()));
|
||||
event.getPlayer().getInventory().addItem(enchant.get().getBook().get(enchant.get(), level));
|
||||
|
||||
instance.getLocale().getMessage("book.discover")
|
||||
.processPlaceholder("group_name", group.getName())
|
||||
.processPlaceholder("group_color", group.getColor())
|
||||
.processPlaceholder("enchant_format", enchant.get().getFormat())
|
||||
.processPlaceholder("level", level)
|
||||
.sendPrefixedMessage(event.getPlayer());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,13 @@ import com.songoda.epicenchants.utils.itemnbtapi.NBTItem;
|
|||
import com.songoda.epicenchants.utils.objects.ItemBuilder;
|
||||
import com.songoda.epicenchants.utils.settings.Settings;
|
||||
import com.songoda.epicenchants.utils.single.GeneralUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -141,4 +143,20 @@ public class EnchantUtils {
|
|||
output.removeLore(TextUtils.formatText(text));
|
||||
return output.build();
|
||||
}
|
||||
|
||||
public int getMaximumEnchantsCanApply(Player p) {
|
||||
int max = 0;
|
||||
if (p.isOp()) return 100; // in theory no single item will have 100 enchantments at a time.
|
||||
for (PermissionAttachmentInfo effectivePermission : p.getEffectivePermissions()) {
|
||||
if (!effectivePermission.getPermission().startsWith("epicenchants.maxapply.")) continue;
|
||||
|
||||
String node[] = effectivePermission.getPermission().split("\\.");
|
||||
|
||||
if (Methods.isInt(node[node.length - 1])) {
|
||||
int num = Integer.parseInt(node[node.length - 1]);
|
||||
if (num > max) max = num;
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ import com.songoda.epicenchants.enums.TriggerType;
|
|||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
@ -68,17 +70,31 @@ public class GeneralUtils {
|
|||
return triggers == null ? Collections.emptySet() : Arrays.stream(triggers.replaceAll("\\s+", "").split(",")).map(TriggerType::valueOf).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static ItemStack getHeldItem(Player player, Event event) {
|
||||
int slot = player.getInventory().getHeldItemSlot();
|
||||
public static ItemStack getHeldItem(LivingEntity entity, Event event) {
|
||||
if (entity instanceof Player) {
|
||||
Player player = (Player)entity;
|
||||
int slot = player.getInventory().getHeldItemSlot();
|
||||
|
||||
try {
|
||||
if (event instanceof PlayerInteractEvent && ((PlayerInteractEvent) event).getHand() == EquipmentSlot.OFF_HAND) {
|
||||
slot = 40;
|
||||
try {
|
||||
if (event instanceof PlayerInteractEvent && ((PlayerInteractEvent) event).getHand() == EquipmentSlot.OFF_HAND) {
|
||||
slot = 40;
|
||||
}
|
||||
} catch (NoSuchMethodError ignore) {
|
||||
}
|
||||
} catch (NoSuchMethodError ignore) {
|
||||
}
|
||||
|
||||
return player.getInventory().getItem(slot);
|
||||
return player.getInventory().getItem(slot);
|
||||
} else if (entity.getEquipment() != null){
|
||||
ItemStack item = entity.getEquipment().getItemInHand();
|
||||
|
||||
try {
|
||||
if (item.getType() == Material.AIR) {
|
||||
return entity.getEquipment().getItemInOffHand();
|
||||
}
|
||||
} catch (NoSuchMethodError ignore) {
|
||||
}
|
||||
return item;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Object parseJS(String toParse, String type, Object def) {
|
||||
|
|
|
@ -58,7 +58,7 @@ public class Placeholders {
|
|||
put("{opponent_is_sneaking}", (user, opponent) -> opponent instanceof Player && ((Player) opponent).isSneaking());
|
||||
|
||||
put("{user_holding}", (user, opponent) -> Optional.ofNullable(getHeldItem(user, null)).map(ItemStack::getType).orElse(Material.AIR));
|
||||
put("{opponent_holding}", (user, opponent) -> opponent instanceof Player ? Optional.ofNullable(getHeldItem((Player) opponent, null)).map(ItemStack::getType).orElse(Material.AIR) : "N/A");
|
||||
put("{opponent_holding}", (user, opponent) -> opponent != null ? Optional.ofNullable(getHeldItem(opponent, null)).map(ItemStack::getType).orElse(Material.AIR) : "N/A");
|
||||
|
||||
put("{user_is_swimming}", (user, opponent) -> user.getLocation().getBlock().isLiquid());
|
||||
put("{opponent_is_swimming}", (user, opponent) -> opponent != null && opponent.getLocation().getBlock().isLiquid());
|
||||
|
|
|
@ -1,63 +1,68 @@
|
|||
#General Messages
|
||||
# General Messages
|
||||
|
||||
general.nametag.prefix = "&8[&6EpicEnchants&8]"
|
||||
general:
|
||||
nametag:
|
||||
prefix: '&8[&6EpicEnchants&8]'
|
||||
|
||||
#Command Messages
|
||||
command.book.received = "&7You have been given a &6{enchant}&r &7book."
|
||||
command.book.gave = "&7You gave &6{player} &7a &6{enchant}&r &7book."
|
||||
command.book.maxlevel = "&cThe max level for &4{enchant}&r &cis &4{max_level}&c."
|
||||
command.book.minlevel = "&cThe min level for &4{enchant}&r &cis &41&c."
|
||||
# Command Messages
|
||||
|
||||
command.randombook.received = "&7You have been given a random book."
|
||||
command.randombook.gave = "&7You gave &6{player} &7a random book."
|
||||
command:
|
||||
book:
|
||||
received: '&7You have been given a &6{enchant}&r &7book.'
|
||||
gave: '&7You gave &6{player} &7a &6{enchant}&r &7book.'
|
||||
maxlevel: '&cThe max level for &4{enchant}&r &cis &4{max_level}&c.'
|
||||
minlevel: '&cThe min level for &4{enchant}&r &cis &41&c.'
|
||||
randombook:
|
||||
received: '&7You have been given a random book.'
|
||||
gave: '&7You gave &6{player} &7a random book.'
|
||||
whitescroll:
|
||||
received: '&7You have been given a whitescroll.'
|
||||
gave: '&7You gave &6{player} &7a whitescroll.'
|
||||
apply:
|
||||
invaliditem: '&cYou cannot apply &4{enchant}&r &cto this item.'
|
||||
reload: '&7Configuration files reloaded.'
|
||||
giveunknown: '&cUnknown item to give &4{unknown}&c.'
|
||||
dust:
|
||||
gave: '&7Gave &6{group} DUST &7to &6{player}&7.'
|
||||
received: '&7You have received &6{group} DUST&7.'
|
||||
|
||||
command.whitescroll.received = "&7You have been given a whitescroll."
|
||||
command.whitescroll.gave = "&7You gave &6{player} &7a whitescroll."
|
||||
# Event Messages
|
||||
|
||||
command.apply.invaliditem = "&cYou cannot apply &4{enchant}&r &cto this item."
|
||||
|
||||
command.reload = "&7Configuration files reloaded."
|
||||
|
||||
command.giveunknown = "&cUnknown item to give &4{unknown}&c."
|
||||
|
||||
command.dust.gave = "&7Gave &6{group} DUST &7to &6{player}&7."
|
||||
command.dust.received = "&7You have received &6{group} DUST&7."
|
||||
|
||||
#Event Messages
|
||||
|
||||
blackscroll.success = "&7Successfully blackscrolled &6{group_color}{enchant}&r&6 {level}&7."
|
||||
blackscroll.noenchants = "&cNo enchants to blackscroll."
|
||||
|
||||
whitescroll.alreadyapplied = "&cThis item is already protected!"
|
||||
whitescroll.applied = "&7This item is now protected!"
|
||||
|
||||
enchanter.cannotafford = "&cYou cannot afford this purchase."
|
||||
enchanter.success = "&7Purchased &6{group_color}{group_name} &7book for &6{exp_cost} experience&7."
|
||||
|
||||
tinkerer.open = "&7Trading with the tinkerer."
|
||||
tinkerer.cancelled = "&cCancelled."
|
||||
tinkerer.accepted = "&7Accepted."
|
||||
tinkerer.noitems = "&cThe tinkerer is not interested in any of your items..."
|
||||
tinkerer.depositedall = "&7Deposited {amount} items."
|
||||
|
||||
alchemist.maxtwoitems = "&cYou may only combine &42 &citems at once..."
|
||||
alchemist.notinterested = "&cThe alchemist is not interested in any of your items..."
|
||||
alchemist.maxlevelbook = "&cThe alchemist cannot combine max leveled books..."
|
||||
alchemist.maxpercentagedust = "&cThe alchemist cannot combine 100% success rate dust..."
|
||||
alchemist.highestgroupdust = "&cThe alchemist cannot accept dust of the highest tier."
|
||||
alchemist.differentenchantment = "&cThe alchemist can only combine books with the same enchantments..."
|
||||
alchemist.differentlevels = "&cThe alchemist can only combine books of the same level..."
|
||||
alchemist.differentgroups = "&cThe alchemist can only combine dust of the same group..."
|
||||
alchemist.cannotafford = "&cYou cannot afford this exchange..."
|
||||
alchemist.success = "&7Exchanged for &6{exp_cost} &7experience."
|
||||
|
||||
enchants.invalidmaterial = "&cYou can not apply &4{enchant}&r &cto that item..."
|
||||
enchants.failure = "&4{enchant}&r &cfailed to apply..."
|
||||
enchants.brokenfailure = "&4{enchant}&r &cfailed to apply and broke your item..."
|
||||
enchants.conflict = "&cYou cannot apply this enchant as it conflicts with another enchant..."
|
||||
enchants.maxedout = "&cYou already have that enchant maxed out on this item..."
|
||||
enchants.alreadyapplied = "&cYou already have that enchant applied on this item."
|
||||
enchants.protected = "&7This book would have broken your item, luckily it was protected!"
|
||||
enchants.success = "&7You have successfully applied &6{enchant}&r&7."
|
||||
|
||||
book.discover = "&7You examine the &6{group_color}{group_name} &7Enchantment Book, and discover &6{enchant_format}&7!"
|
||||
blackscroll:
|
||||
success: '&7Successfully blackscrolled &6{group_color}{enchant}&r&6 {level}&7.'
|
||||
noenchants: '&cNo enchants to blackscroll.'
|
||||
whitescroll:
|
||||
alreadyapplied: '&cThis item is already protected!'
|
||||
applied: '&7This item is now protected!'
|
||||
enchanter:
|
||||
cannotafford: '&cYou cannot afford this purchase.'
|
||||
success: '&7Purchased &6{group_color}{group_name} &7book for &6{exp_cost} experience&7.'
|
||||
tinkerer:
|
||||
open: '&7Trading with the tinkerer.'
|
||||
cancelled: '&cCancelled.'
|
||||
accepted: '&7Accepted.'
|
||||
noitems: '&cThe tinkerer is not interested in any of your items...'
|
||||
depositedall: '&7Deposited {amount} items.'
|
||||
alchemist:
|
||||
maxtwoitems: '&cYou may only combine &42 &citems at once...'
|
||||
notinterested: '&cThe alchemist is not interested in any of your items...'
|
||||
maxlevelbook: '&cThe alchemist cannot combine max leveled books...'
|
||||
maxpercentagedust: '&cThe alchemist cannot combine 100% success rate dust...'
|
||||
highestgroupdust: '&cThe alchemist cannot accept dust of the highest tier.'
|
||||
differentenchantment: '&cThe alchemist can only combine books with the same enchantments...'
|
||||
differentlevels: '&cThe alchemist can only combine books of the same level...'
|
||||
differentgroups: '&cThe alchemist can only combine dust of the same group...'
|
||||
cannotafford: '&cYou cannot afford this exchange...'
|
||||
success: '&7Exchanged for &6{exp_cost} &7experience.'
|
||||
enchants:
|
||||
invalidmaterial: '&cYou can not apply &4{enchant}&r &cto that item...'
|
||||
failure: '&4{enchant}&r &cfailed to apply...'
|
||||
brokenfailure: '&4{enchant}&r &cfailed to apply and broke your item...'
|
||||
conflict: '&cYou cannot apply this enchant as it conflicts with another enchant...'
|
||||
maxedout: '&cYou already have that enchant maxed out on this item...'
|
||||
alreadyapplied: '&cYou already have that enchant applied on this item.'
|
||||
protected: '&7This book would have broken your item, luckily it was protected!'
|
||||
success: '&7You have successfully applied &6{enchant}&r&7.'
|
||||
maxallowed: '&cYou cannot apply more than &4{max_enchants} &cenchants!'
|
||||
book:
|
||||
discover: '&7You examine the &6{group_color}{group_name} &7Enchantment Book, and discover &6{enchant_format}&7!'
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&9AntiGravity {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Permanent jump boost."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&9Frozen {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Slow your enemies down when"
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
#Who made this?
|
||||
Author: Auora
|
||||
|
||||
# The enchant identifier must be unique.
|
||||
identifier: Healy
|
||||
|
||||
# The max level for this enchant.
|
||||
max-level: 4
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
book-item:
|
||||
|
||||
material: BOOK
|
||||
|
||||
display-name: "&a&lHealy {level}"
|
||||
|
||||
# The lore on the enchantments books.
|
||||
|
||||
lore:
|
||||
|
||||
- "&7Drag on to enchant"
|
||||
|
||||
- "&a{success_rate}% Success Rate"
|
||||
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
|
||||
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
|
||||
applied-format: "&aHealy {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance of remove the players effects"
|
||||
|
||||
# What items this enchant can be applied to.
|
||||
item-whitelist:
|
||||
- "ARMOR"
|
||||
|
||||
# For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials
|
||||
effects:
|
||||
REMOVE_EFFECT:
|
||||
# The trigger that will fire this effect.
|
||||
trigger: POISON_DAMAGE
|
||||
# What player should the effect be ran on: WEARER/OPPONENT.
|
||||
who: USER
|
||||
# The potion type.
|
||||
potion-type: POISON
|
||||
# Chance of the effect firing.
|
||||
chance: "3 * {level}"
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&9Poison {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance of giving the poison effect."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&9RocketEscape {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Blast off into the air at low HP."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&9Shockwave {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Push your attackers backwards"
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
# The enchant identifier must be unique.
|
||||
#Who made this?
|
||||
|
||||
Author: Auora
|
||||
|
||||
identifier: Shocky
|
||||
|
||||
# The max level for this enchant.
|
||||
max-level: 5
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
book-item:
|
||||
|
||||
material: BOOK
|
||||
|
||||
display-name: "&b&lShocky {level}"
|
||||
|
||||
# The lore on the enchantments books.
|
||||
|
||||
lore:
|
||||
|
||||
- "&7Drag on to enchant"
|
||||
|
||||
- "&a{success_rate}% Success Rate"
|
||||
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
|
||||
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
|
||||
applied-format: "&bShocky {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance of forming an explosion while mining"
|
||||
|
||||
# What items this enchant can be applied to.
|
||||
item-whitelist:
|
||||
- "PICKAXE"
|
||||
|
||||
# For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials
|
||||
effects:
|
||||
SPAWN_TNT:
|
||||
# The trigger that will fire this effect.
|
||||
trigger: BLOCK_BREAK
|
||||
|
||||
fuse: 0
|
||||
|
||||
amount: "{random(low=0, up={level})}"
|
||||
# Chance of the effect firing.
|
||||
chance: "5 * {level}"
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ELITE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&9Wither {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Infect your enemies with a wither"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 1
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bDeathBringer {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance to gain Strength for a short time."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bDeathGod {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance of regain a lot of hearts"
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
#Who made this?
|
||||
|
||||
Author: Auora
|
||||
|
||||
# The enchant identifier must be unique.
|
||||
|
||||
identifier: Divergent
|
||||
|
||||
|
||||
|
||||
# The max level for this enchant.
|
||||
|
||||
max-level: 4
|
||||
|
||||
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
|
||||
group: LEGENDARY
|
||||
|
||||
|
||||
|
||||
book-item:
|
||||
|
||||
|
||||
|
||||
material: BOOKa
|
||||
|
||||
|
||||
|
||||
display-name: "&c&lDivergent {level}"
|
||||
|
||||
|
||||
|
||||
# The lore on the enchantments books.
|
||||
|
||||
|
||||
|
||||
lore:
|
||||
|
||||
|
||||
|
||||
- "&7Drag on to enchant"
|
||||
|
||||
|
||||
|
||||
- "&a{success_rate}% Success Rate"
|
||||
|
||||
|
||||
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
|
||||
|
||||
|
||||
applied-format: "&cDivergent {level}"
|
||||
|
||||
|
||||
|
||||
# Description
|
||||
|
||||
description:
|
||||
|
||||
- "A chance of giving your opponent slowness and you speed!"
|
||||
|
||||
|
||||
|
||||
# What items this enchant can be applied to.
|
||||
|
||||
item-whitelist:
|
||||
|
||||
- "ARMOR"
|
||||
|
||||
|
||||
|
||||
# For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials
|
||||
|
||||
effects:
|
||||
|
||||
POTION:
|
||||
|
||||
# The trigger that will fire this effect.
|
||||
|
||||
trigger: ATTACK_PLAYER_MELEE
|
||||
|
||||
# Who do you want to give the effect?
|
||||
|
||||
who: OPPONENT
|
||||
|
||||
# What player should the effect be ran on: WEARER/OPPONENT.
|
||||
|
||||
potion-type: SLOWNESS
|
||||
|
||||
|
||||
|
||||
amplifier: "{level}"
|
||||
|
||||
|
||||
|
||||
duration: "{level} * 3"
|
||||
|
||||
# Chance of the effect firing.
|
||||
|
||||
chance: "4 * {level}"
|
||||
|
||||
POTION-2:
|
||||
|
||||
# The trigger that will fire this effect.
|
||||
|
||||
trigger: ATTACK_PLAYER_MELEE
|
||||
|
||||
# Who do you want to give the effect?
|
||||
|
||||
who: USER
|
||||
|
||||
# What player should the effect be ran on: WEARER/OPPONENT.
|
||||
|
||||
potion-type: SPEED
|
||||
|
||||
|
||||
|
||||
amplifier: "{level}"
|
||||
|
||||
|
||||
|
||||
duration: "{level} * 3"
|
||||
|
||||
# Chance of the effect firing.
|
||||
|
||||
chance: "4 * {level}"
|
|
@ -0,0 +1,59 @@
|
|||
#Who made this?
|
||||
|
||||
Author: Auora
|
||||
|
||||
|
||||
# The enchant identifier must be unique.
|
||||
identifier: Drunk
|
||||
|
||||
# The max level for this enchant.
|
||||
max-level: 4
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
book-item:
|
||||
|
||||
material: BOOK
|
||||
|
||||
display-name: "&2&lDrunk {level}"
|
||||
|
||||
# The lore on the enchantments books.
|
||||
|
||||
lore:
|
||||
|
||||
- "&7Drag on to enchant"
|
||||
|
||||
- "&a{success_rate}% Success Rate"
|
||||
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
|
||||
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
|
||||
applied-format: "&2Drunk {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance of making your opponent drunk!"
|
||||
|
||||
# What items this enchant can be applied to.
|
||||
item-whitelist:
|
||||
- "ARMOR"
|
||||
|
||||
# For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials
|
||||
effects:
|
||||
POTION:
|
||||
# The trigger that will fire this effect.
|
||||
trigger: DEFENSE_PLAYER_MELEE,DEFENSE_PLAYER_RANGE
|
||||
# Who do you want to give the effect?
|
||||
who: OPPONENT
|
||||
# What player should the effect be ran on: WEARER/OPPONENT.
|
||||
potion-type: NAUSEA
|
||||
|
||||
amplifier: "{level}"
|
||||
|
||||
duration: "{level} * 3"
|
||||
# Chance of the effect firing.
|
||||
chance: "4 * {level}"
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bEnlightened {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance to heal while damaged."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bGears {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Gain speed when equipped."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bLifeSteal {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance to steal life from your opponent."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bOverload {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Grants permanent extra health."
|
||||
|
|
|
@ -12,6 +12,9 @@ group: LEGENDARY
|
|||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bResist {level}"
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bResist {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance of giving the resist effect."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: LEGENDARY
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&bSkillSwipe {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance to steal EXP from your opponent."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 1
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aAquatic {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Gives permanent water breathing."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aConfusion {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to deal"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aExperience {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to receive"
|
||||
|
|
|
@ -6,6 +6,9 @@ identifier: Glowing
|
|||
# The max level for this enchant.
|
||||
max-level: 1
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aGlowing {level}"
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aHaste {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Permanent haste effect when"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 7
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aInsomnia {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to give your opponent"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aLightning {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to strike lightning"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aObliterate {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to deal extreme knockback"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 1
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&aOxygenate {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to refill your oxygen"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ULTIMATE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&dBlind {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance to give the blindness on"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ULTIMATE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&dDodge {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Chance to dodge melee attacks,"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 1
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ULTIMATE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&dFly {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Gives you fly when you equip the"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 2
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ULTIMATE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&dIceAspect {level}"
|
||||
|
||||
#Description
|
||||
description:
|
||||
- "Chance to slow your opponent."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: ULTIMATE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&dStormFall {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Summon Lightnings at your Opponnent."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&eBerserk {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to receive strength."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&eDecapitation {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "Decapitate your victim and"
|
||||
|
|
|
@ -6,6 +6,9 @@ identifier: Explosive
|
|||
# The max level for this enchant.
|
||||
max-level: 5
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&eExplosive {level}"
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&eFeathWeight {level}"
|
||||
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to give a burst of haste."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 5
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&eObsidianDestroyer {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to instantly break obsidian."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 8
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&ePlagueCarrier {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "When near death summon creepers"
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 4
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&Ragdoll {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "A chance to be pushed back when."
|
||||
|
|
|
@ -9,6 +9,9 @@ max-level: 3
|
|||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: UNIQUE
|
||||
|
||||
# How the enchant should be formatted on the enchanted item.
|
||||
applied-format: "&eSelfDestruct {level}"
|
||||
|
||||
# Description
|
||||
description:
|
||||
- "When near death spawns tnt around you."
|
||||
|
|
Loading…
Reference in New Issue