Added PlaceholderAPI implementations.
Cleaned up version dependent config system.
This commit is contained in:
parent
fb22845bcb
commit
4d87218ed9
13
core/pom.xml
13
core/pom.xml
|
@ -20,10 +20,16 @@
|
|||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>aikar</id>
|
||||
<url>https://repo.aikar.co/content/groups/aikar/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>placeholderapi</id>
|
||||
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
|
@ -107,5 +113,12 @@
|
|||
<version>1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>2.9.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,11 +1,13 @@
|
|||
package com.songoda.epicenchants;
|
||||
|
||||
import co.aikar.commands.BukkitCommandManager;
|
||||
import com.songoda.epicenchants.hooks.HookManager;
|
||||
import com.songoda.epicenchants.listeners.ArmorListener;
|
||||
import com.songoda.epicenchants.listeners.EntityListener;
|
||||
import com.songoda.epicenchants.listeners.PlayerListener;
|
||||
import com.songoda.epicenchants.listeners.item.*;
|
||||
import com.songoda.epicenchants.listeners.item.BlackScrollListener;
|
||||
import com.songoda.epicenchants.listeners.item.BookListener;
|
||||
import com.songoda.epicenchants.listeners.item.DustListener;
|
||||
import com.songoda.epicenchants.listeners.item.WhiteScrollListener;
|
||||
import com.songoda.epicenchants.managers.*;
|
||||
import com.songoda.epicenchants.objects.Enchant;
|
||||
import com.songoda.epicenchants.utils.EnchantUtils;
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.songoda.epicenchants.effect;
|
|||
|
||||
import com.songoda.epicenchants.enums.EventType;
|
||||
import com.songoda.epicenchants.enums.TriggerType;
|
||||
import com.songoda.epicenchants.objects.Condition;
|
||||
import com.songoda.epicenchants.objects.LeveledModifier;
|
||||
import com.songoda.epicenchants.utils.single.GeneralUtils;
|
||||
import lombok.Getter;
|
||||
|
@ -14,15 +15,18 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static com.songoda.epicenchants.effect.EffectExecutor.Who.*;
|
||||
import static com.songoda.epicenchants.effect.EffectExecutor.Who.OPPONENT;
|
||||
import static com.songoda.epicenchants.effect.EffectExecutor.Who.WEARER;
|
||||
|
||||
public abstract class EffectExecutor {
|
||||
@Getter private final ConfigurationSection section;
|
||||
@Getter private final TriggerType triggerType;
|
||||
private final Condition condition;
|
||||
|
||||
public EffectExecutor(ConfigurationSection section) {
|
||||
this.section = section;
|
||||
this.triggerType = TriggerType.valueOf(section.getString("trigger"));
|
||||
this.condition = Condition.of(section.getString("condition"));
|
||||
}
|
||||
|
||||
public void testAndRun(@NotNull Player wearer, @Nullable LivingEntity opponent, int level, TriggerType type, Event event, EventType eventType) {
|
||||
|
@ -34,6 +38,10 @@ public abstract class EffectExecutor {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!condition.get(wearer, opponent, level, false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this instanceof EffectEventExecutor) {
|
||||
((EffectEventExecutor) this).execute(wearer, opponent, level, event, eventType);
|
||||
return;
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package com.songoda.epicenchants.hooks;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface FactionsHook {
|
||||
String getRelationToLocation(Player player);
|
||||
|
||||
boolean isFriendly(Player player, Player other);
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package com.songoda.epicenchants.managers;
|
||||
|
||||
import com.songoda.epicenchants.EpicEnchants;
|
||||
import com.songoda.epicenchants.utils.objects.FileLocationObject;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
@ -12,18 +12,18 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
import static com.songoda.epicenchants.utils.objects.FileLocationObject.of;
|
||||
import static java.io.File.separator;
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.apache.commons.lang3.tuple.Pair.of;
|
||||
|
||||
public class FileManager extends Manager<String, FileConfiguration> {
|
||||
|
||||
private final String directory;
|
||||
private final LinkedHashSet<Pair<String, Boolean>> files = new LinkedHashSet<>(asList(
|
||||
private final LinkedHashSet<FileLocationObject> files = new LinkedHashSet<>(asList(
|
||||
of("config.yml", true),
|
||||
of("menus/main-info-menu.yml", true),
|
||||
of("menus/enchanter-menu.yml", true),
|
||||
of("menus/tinkerer-menu.yml", true),
|
||||
of("menus/enchanter-menu.yml", true, true),
|
||||
of("menus/tinkerer-menu.yml", true, true),
|
||||
of("menus/groups/simple-menu.yml", false),
|
||||
of("menus/groups/unique-menu.yml", false),
|
||||
of("menus/groups/elite-menu.yml", false),
|
||||
|
@ -32,41 +32,41 @@ public class FileManager extends Manager<String, FileConfiguration> {
|
|||
of("enchants/example-enchant.yml", false),
|
||||
of("groups.yml", true),
|
||||
of("actions.yml", true),
|
||||
of("items/special-items.yml", true),
|
||||
of("items/dusts.yml", true)
|
||||
of("items/special-items.yml", true, true),
|
||||
of("items/dusts.yml", true, true)
|
||||
));
|
||||
|
||||
public FileManager(EpicEnchants instance) {
|
||||
super(instance);
|
||||
|
||||
directory = instance.getVersion() > 12 ? "master-config" : "legacy-config";
|
||||
directory = instance.getVersion() > 12 ? "master" : "legacy";
|
||||
|
||||
Bukkit.getConsoleSender().sendMessage("Using the " + directory + " because version is 1." + instance.getVersion());
|
||||
}
|
||||
|
||||
public void loadFiles() {
|
||||
files.forEach(pair -> {
|
||||
File file = new File(instance.getDataFolder() + separator + pair.getLeft());
|
||||
files.forEach(fileLocation -> {
|
||||
File file = new File(instance.getDataFolder() + separator + fileLocation.getPath());
|
||||
|
||||
if (!file.exists() && (pair.getRight() || getConfiguration("config").getBoolean("first-load"))) {
|
||||
if (!file.exists() && (fileLocation.isRequired() || getConfiguration("config").getBoolean("first-load"))) {
|
||||
file.getParentFile().mkdirs();
|
||||
Bukkit.getConsoleSender().sendMessage("Creating file: " + pair.getLeft());
|
||||
Bukkit.getConsoleSender().sendMessage("Creating file: " + fileLocation.getPath());
|
||||
|
||||
try {
|
||||
FileUtils.copyInputStreamToFile(instance.getResource(directory + "/" + pair.getLeft()), file);
|
||||
FileUtils.copyInputStreamToFile(instance.getResource(fileLocation.getResourcePath(directory)), file);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (pair.getRight()) {
|
||||
if (fileLocation.isRequired()) {
|
||||
FileConfiguration configuration = new YamlConfiguration();
|
||||
try {
|
||||
configuration.load(file);
|
||||
} catch (IOException | InvalidConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
add(pair.getLeft().replace(".yml", ""), configuration);
|
||||
add(fileLocation.getPath().replace(".yml", ""), configuration);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.songoda.epicenchants.hooks;
|
||||
package com.songoda.epicenchants.managers;
|
||||
|
||||
import com.songoda.ultimatebottles.UltimateBottles;
|
||||
import lombok.Getter;
|
||||
|
@ -8,7 +8,6 @@ import java.util.Optional;
|
|||
|
||||
@Getter
|
||||
public class HookManager {
|
||||
private FactionsHook factionsHook;
|
||||
private UltimateBottles ultimateBottles;
|
||||
|
||||
public void setup() {
|
|
@ -1,8 +1,11 @@
|
|||
package com.songoda.epicenchants.objects;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
||||
|
@ -20,7 +23,7 @@ public class Condition {
|
|||
return new Condition(string);
|
||||
}
|
||||
|
||||
public boolean get(Player wearer, LivingEntity attacker, int level, boolean def) {
|
||||
public boolean get(Player wearer, @Nullable LivingEntity attacker, int level, boolean def) {
|
||||
if (string == null || string.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -31,7 +34,7 @@ public class Condition {
|
|||
for (Placeholder pair : Arrays.asList(
|
||||
Placeholder.of("level", level),
|
||||
Placeholder.of("wearer_health", wearer.getHealth()),
|
||||
Placeholder.of("attacker_health", attacker.getHealth()),
|
||||
Placeholder.of("attacker_health", attacker == null ? -1 : attacker.getHealth()),
|
||||
Placeholder.of("wearer_food", wearer.getFoodLevel()),
|
||||
Placeholder.of("attacker_food", attacker instanceof Player ? ((Player) attacker).getFoodLevel() : 0),
|
||||
Placeholder.of("wearer_is_sneaking", wearer.isSneaking()),
|
||||
|
@ -39,15 +42,26 @@ public class Condition {
|
|||
Placeholder.of("world", wearer.getWorld().getName()),
|
||||
Placeholder.of("players_near", wearer.getNearbyEntities(4, 4, 4).size()),
|
||||
Placeholder.of("wearer_on_fire", wearer.getFireTicks() != 0),
|
||||
Placeholder.of("attacker_on_fire", attacker.getFireTicks() != 0)
|
||||
Placeholder.of("attacker_on_fire", attacker != null && attacker.getFireTicks() != 0)
|
||||
)) {
|
||||
toValidate = toValidate.replace(pair.getPlaceholder(), pair.getToReplace().toString());
|
||||
}
|
||||
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||
toValidate = PlaceholderAPI.setPlaceholders(wearer, toValidate);
|
||||
|
||||
if (attacker instanceof Player) {
|
||||
toValidate = PlaceholderAPI.setRelationalPlaceholders(wearer, (Player) attacker, toValidate);
|
||||
}
|
||||
}
|
||||
|
||||
toValidate = ChatColor.stripColor(toValidate);
|
||||
|
||||
try {
|
||||
return Boolean.parseBoolean(scriptEngine.eval(toValidate).toString());
|
||||
} catch (ScriptException | NumberFormatException e) {
|
||||
} catch (ScriptException ignore) {
|
||||
Bukkit.getLogger().warning("[EpicEnchants] One of your condition expressions is not properly formatted.");
|
||||
Bukkit.getLogger().warning(toValidate);
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,13 +32,8 @@ public class Enchant {
|
|||
private List<String> description;
|
||||
private String format;
|
||||
@Nullable private BookItem bookItem;
|
||||
private Condition condition;
|
||||
|
||||
public void onAction(@NotNull Player wearer, @Nullable LivingEntity opponent, Event event, int level, TriggerType triggerType, EventType eventType) {
|
||||
if (!condition.get(wearer, opponent, level, false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
effectExecutors.forEach(effect -> effect.testAndRun(wearer, opponent, level, triggerType, event, eventType));
|
||||
mobs.forEach(mobWrapper -> mobWrapper.trySpawn(wearer, opponent, level, triggerType));
|
||||
}
|
||||
|
|
|
@ -28,10 +28,13 @@ public class LeveledModifier {
|
|||
|
||||
ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName("JavaScript");
|
||||
|
||||
String toTest = string.replace("{level}", "" + level);
|
||||
|
||||
try {
|
||||
return Double.parseDouble(scriptEngine.eval(string.replace("{level}", "" + level)).toString());
|
||||
return Double.parseDouble(scriptEngine.eval(toTest).toString());
|
||||
} catch (ScriptException | NumberFormatException e) {
|
||||
Bukkit.getLogger().warning("[EpicEnchants] One of your math expressions is not properly formatted.");
|
||||
Bukkit.getLogger().warning(toTest);
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.songoda.epicenchants.utils.objects;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
public class FileLocationObject {
|
||||
@Getter private final boolean required, versionDependent;
|
||||
@Getter private final String path;
|
||||
|
||||
private FileLocationObject(String path, boolean required, boolean versionDependent) {
|
||||
this.required = required;
|
||||
this.versionDependent = versionDependent;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public static FileLocationObject of(String path, boolean required) {
|
||||
return new FileLocationObject(path, required, false);
|
||||
}
|
||||
|
||||
public static FileLocationObject of(String path, boolean required, boolean versionDependent) {
|
||||
return new FileLocationObject(path, required, versionDependent);
|
||||
}
|
||||
|
||||
public String getResourcePath(String dir) {
|
||||
return (versionDependent ? "version-dependent/" + dir + "/" : "") + path;
|
||||
}
|
||||
}
|
|
@ -3,7 +3,10 @@ package com.songoda.epicenchants.utils.single;
|
|||
import com.songoda.epicenchants.EpicEnchants;
|
||||
import com.songoda.epicenchants.effect.EffectManager;
|
||||
import com.songoda.epicenchants.enums.TriggerType;
|
||||
import com.songoda.epicenchants.objects.*;
|
||||
import com.songoda.epicenchants.objects.BookItem;
|
||||
import com.songoda.epicenchants.objects.Enchant;
|
||||
import com.songoda.epicenchants.objects.Group;
|
||||
import com.songoda.epicenchants.objects.LeveledModifier;
|
||||
import com.songoda.epicenchants.utils.objects.ItemBuilder;
|
||||
import com.songoda.epicenchants.wrappers.EnchantmentWrapper;
|
||||
import com.songoda.epicenchants.wrappers.MobWrapper;
|
||||
|
@ -13,7 +16,10 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.songoda.epicenchants.utils.single.GeneralUtils.color;
|
||||
|
@ -28,7 +34,6 @@ public class ConfigParser {
|
|||
.bookItem(parseBookItem(instance, config.getConfigurationSection("book-item")))
|
||||
.itemWhitelist((config.isList("item-whitelist") ? config.getStringList("item-whitelist").stream().map(instance.getItemGroup()::get).flatMap(Collection::stream).collect(Collectors.toSet()) : Collections.emptySet()))
|
||||
.conflict(config.isList("conflicting-enchants") ? new HashSet<>(config.getStringList("conflicting-enchants")) : Collections.emptySet())
|
||||
.condition(Condition.of(config.getString("condition")))
|
||||
.mobs(config.isConfigurationSection("mobs") ? config.getConfigurationSection("mobs").getKeys(false).stream()
|
||||
.map(s -> "mobs." + s)
|
||||
.map(config::getConfigurationSection)
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#LEGACY CONFIG
|
||||
|
||||
first-load: true
|
||||
|
||||
language: "en_US"
|
||||
|
||||
roman-numbers: true
|
||||
|
||||
rates:
|
||||
black-scroll-min: 20
|
||||
black-scroll-max: 100
|
||||
|
||||
commands:
|
||||
enchanter: "enchanter"
|
||||
alchemist: "alchemist"
|
||||
tinkerer: "tinkerer"
|
|
@ -1,96 +0,0 @@
|
|||
# The enchant identifier must be unique.
|
||||
identifier: ExampleEnchant
|
||||
|
||||
# The max level for this enchant.
|
||||
max-level: 3
|
||||
|
||||
# The group of this enchant. Configure the groups in the groups.yml file.
|
||||
group: SIMPLE
|
||||
|
||||
# The item that the enchantment book is.
|
||||
book-item:
|
||||
material: BOOK
|
||||
display-name: "&b&lExampleEnchant {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: "&cExampleEnchant {level}"
|
||||
|
||||
# What items this enchant can be applied too.
|
||||
item-whitelist:
|
||||
- "HELMETS"
|
||||
|
||||
# This enchantment can not be applied if then enchantment below is already on the item.
|
||||
conflicting-enchants:
|
||||
- "someEnchant"
|
||||
|
||||
# For a full list of effects, please visit: https://wiki.songoda.com/display/SON/EpicEnchants
|
||||
effects:
|
||||
# The "-1" is added because every effect key has to be unique.
|
||||
POTION-1:
|
||||
# The trigger that will fire this effect
|
||||
trigger: DEFENSE_PLAYER_MELEE
|
||||
# What player should the effect be ran on: WEARER/OPPONENT.
|
||||
who: WEARER
|
||||
# Potion Effect that should be applied.
|
||||
potion-type: SPEED
|
||||
# Duration of the Potion Effect in seconds.
|
||||
duration: "10 * {level}"
|
||||
# Chance that the Effect gets activated.
|
||||
chance: "20 * {level}"
|
||||
# Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc.
|
||||
amplifier: "{level} - 1"
|
||||
POTION-2:
|
||||
trigger: STATIC_EFFECT
|
||||
who: WEARER
|
||||
potion-type: INCREASE_DAMAGE
|
||||
amplifier: "{level} - 1"
|
||||
|
||||
# Chance of spawning when damaged by another player.
|
||||
mobs:
|
||||
# Type of Mob
|
||||
ZOMBIE:
|
||||
# Trigger event that spawns the mob.
|
||||
trigger: DEFENSE_PLAYER_MELEE
|
||||
# Max amount mobs that will be spawned.
|
||||
max-amount: "{level}"
|
||||
# Chance of trigger the mob spawning.
|
||||
spawn-percentage: "20 * {level}"
|
||||
# Drop chance of the mob its equipment upon death.
|
||||
equipment-drop-chance: "10 * {level}"
|
||||
# Health of the mob.
|
||||
health: "3 * {level}"
|
||||
# Amount of damage the mob deals.
|
||||
attack-damage: "{level}"
|
||||
# Display name of the spawned mob
|
||||
display-name: "&cAngry guy level {level}"
|
||||
# The equiment that the mob wears
|
||||
equipment:
|
||||
helmet:
|
||||
material: DIAMOND_HELMET
|
||||
enchants:
|
||||
- "DURABILITY:{level}"
|
||||
- "THORNS:{level} - 1"
|
||||
chestplate:
|
||||
material: DIAMOND_CHESTPLATE
|
||||
enchants:
|
||||
- "DURABILITY:{level}"
|
||||
- "THORNS:{level} - 1"
|
||||
leggings:
|
||||
material: DIAMOND_LEGGINGS
|
||||
enchants:
|
||||
- "DURABILITY:{level}"
|
||||
- "THORNS:{level} - 1"
|
||||
boots:
|
||||
material: DIAMOND_BOOTS
|
||||
enchants:
|
||||
- "DURABILITY:{level}"
|
||||
- "THORNS:{level} - 1"
|
||||
hand-item:
|
||||
material: DIAMOND_SWORD
|
||||
enchant:
|
||||
- "SHARPNESS:{level}"
|
|
@ -1,29 +0,0 @@
|
|||
title: "Main info menu"
|
||||
size: 9
|
||||
|
||||
contents:
|
||||
1:
|
||||
material: "PAPER"
|
||||
display-name: "&f&lSimple Enchantments"
|
||||
group: SIMPLE
|
||||
slot: 0
|
||||
2:
|
||||
material: "PAPER"
|
||||
display-name: "&a&lUnique Enchantments"
|
||||
group: UNIQUE
|
||||
slot: 1
|
||||
3:
|
||||
material: "PAPER"
|
||||
display-name: "&b&lElite Enchantments"
|
||||
group: ELITE
|
||||
slot: 2
|
||||
4:
|
||||
material: "PAPER"
|
||||
display-name: "&e&lUltimate Enchantments"
|
||||
group: ULTIMATE
|
||||
slot: 3
|
||||
5:
|
||||
material: "PAPER"
|
||||
display-name: "&6&lLegendary Enchantments"
|
||||
group: LEGENDARY
|
||||
slot: 4
|
|
@ -1,42 +0,0 @@
|
|||
general:
|
||||
prefix: "&8[&6EpicEnchants&8]"
|
||||
no-permission: "&cYou do not have permission to do that."
|
||||
|
||||
command:
|
||||
book:
|
||||
received: "&7You have been given a &6{enchant} &7book."
|
||||
gave: "&7You gave {player} a &6{enchant} &7book."
|
||||
max-level: "&cThe max level for {enchant} is {max-level}."
|
||||
|
||||
white-scroll:
|
||||
received: "&7You have been given a whitescroll."
|
||||
gave: "&7You gave {player} a whitescroll."
|
||||
|
||||
reload: "&6Configuration files reload"
|
||||
|
||||
enchanter:
|
||||
cannot-afford: "&cYou cannot afford this purchase."
|
||||
success: "&7Purchased {group_color}{group_name} &7book for &f{exp_cost} EXP&7."
|
||||
|
||||
tinkerer:
|
||||
open: "&eTrading with the tinkerer."
|
||||
cancelled: "&cCancelled."
|
||||
accepted: "&aAccepted"
|
||||
no-items: "&c&l(!) &r&cThe tinkerer is not interested in any of your items!"
|
||||
deposited-all: "&a&l(!) &r&aDeposited {amount} items."
|
||||
|
||||
enchants:
|
||||
invalid-material: "&cYou can not apply &6{enchant} &cto that item."
|
||||
broken-failure: "&6{enchant} &cfailed to apply and broke your item..."
|
||||
success: "&aYou have success fully applied &6{enchant}."
|
||||
conflict: "&cYou cannot apply this enchant as it conflicts with another enchant."
|
||||
maxed-out: "&cYou already have that enchant maxed on this item."
|
||||
already-applied: "&cYou already have that enchant with that level applied on this item."
|
||||
protected: "&aYour book would have broken your item, luckily it was protected!"
|
||||
|
||||
book:
|
||||
discover:
|
||||
- "&l&e(!) &r&eYou examine the {group_color}{group_name} Enchantment Book..."
|
||||
- "&eand discover &n{enchant_format}!"
|
||||
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
groups:
|
||||
SIMPLE:
|
||||
group-color: "&f"
|
||||
group-name: "Simple"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
success-min: 10
|
||||
success-max: 100
|
||||
book-item:
|
||||
material: BOOK
|
||||
display-name: "&l&n{group_color}{enchant} {level}"
|
||||
lore:
|
||||
- "&a{success_rate}% Success Rate"
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
- "{description}"
|
||||
- "&7{item_group} Enchantment"
|
||||
- "&7Drag and drop to enchant."
|
||||
UNIQUE:
|
||||
group-color: "&a"
|
||||
group-name: "Unique"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
success-min: 20
|
||||
success-max: 80
|
||||
book-item:
|
||||
material: BOOK
|
||||
display-name: "{group_color}{enchant} {level}"
|
||||
lore:
|
||||
- "&a{success_rate}% Success Rate"
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
- "{description}"
|
||||
- "&7{item_group} Enchantment"
|
||||
- "&7Drag and drop to enchant."
|
||||
ELITE:
|
||||
group-color: "&b"
|
||||
group-name: "Elite"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
success-min: 20
|
||||
success-max: 80
|
||||
book-item:
|
||||
material: BOOK
|
||||
display-name: "{group_color}{enchant} {level}"
|
||||
lore:
|
||||
- "&a{success_rate}% Success Rate"
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
- "{description}"
|
||||
- "&7{item_group} Enchantment"
|
||||
- "&7Drag and drop to enchant."
|
||||
ULTIMATE:
|
||||
group-color: "&e"
|
||||
group-name: "Ultimate"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
success-min: 20
|
||||
success-max: 80
|
||||
book-item:
|
||||
material: BOOK
|
||||
display-name: "{group_color}{enchant} {level}"
|
||||
lore:
|
||||
- "&a{success_rate}% Success Rate"
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
- "{description}"
|
||||
- "&7{item_group} Enchantment"
|
||||
- "&7Drag and drop to enchant."
|
||||
LEGENDARY:
|
||||
group-color: "&6"
|
||||
group-name: "Legendary"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
success-min: 20
|
||||
success-max: 80
|
||||
book-item:
|
||||
material: BOOK
|
||||
display-name: "{group_color}{enchant} {level}"
|
||||
lore:
|
||||
- "&a{success_rate}% Success Rate"
|
||||
- "&c{destroy_rate}% Destroy Rate"
|
||||
- "{description}"
|
||||
- "&7{item_group} Enchantment"
|
||||
- "&7Drag and drop to enchant."
|
|
@ -1,15 +0,0 @@
|
|||
title: "Elite enchants"
|
||||
size: 9
|
||||
|
||||
#Slots that you want enchants to be displayed on
|
||||
slots: "4,5,6"
|
||||
|
||||
#The group of the enchants to be displayed
|
||||
group: ELITE
|
||||
|
||||
enchant-item:
|
||||
material: "PAPER"
|
||||
display-name: "{group_color} {enchant}"
|
||||
lore:
|
||||
- "&7Description:"
|
||||
- "{description}"
|
|
@ -1,15 +0,0 @@
|
|||
title: "Legendary enchants"
|
||||
size: 9
|
||||
|
||||
#Slots that you want enchants to be displayed on
|
||||
slots: "4,5,6"
|
||||
|
||||
#The group of the enchants to be displayed
|
||||
group: LEGENDARY
|
||||
|
||||
enchant-item:
|
||||
material: "PAPER"
|
||||
display-name: "{group_color} {enchant}"
|
||||
lore:
|
||||
- "&7Description:"
|
||||
- "{description}"
|
|
@ -1,15 +0,0 @@
|
|||
title: "Simple enchants"
|
||||
size: 9
|
||||
|
||||
#Slots that you want enchants to be displayed on
|
||||
slots: "4,5,6"
|
||||
|
||||
#The group of the enchants to be displayed
|
||||
group: SIMPLE
|
||||
|
||||
enchant-item:
|
||||
material: "PAPER"
|
||||
display-name: "{group_color} {enchant}"
|
||||
lore:
|
||||
- "&7Description:"
|
||||
- "{description}"
|
|
@ -1,15 +0,0 @@
|
|||
title: "Ultimate enchants"
|
||||
size: 9
|
||||
|
||||
#Slots that you want enchants to be displayed on
|
||||
slots: "4,5,6"
|
||||
|
||||
#The group of the enchants to be displayed
|
||||
group: ULTIMATE
|
||||
|
||||
enchant-item:
|
||||
material: "PAPER"
|
||||
display-name: "{group_color} {enchant}"
|
||||
lore:
|
||||
- "&7Description:"
|
||||
- "{description}"
|
|
@ -1,15 +0,0 @@
|
|||
title: "Unique enchants"
|
||||
size: 9
|
||||
|
||||
#Slots that you want enchants to be displayed on
|
||||
slots: "4,5,6"
|
||||
|
||||
#The group of the enchants to be displayed
|
||||
group: UNIQUE
|
||||
|
||||
enchant-item:
|
||||
material: "PAPER"
|
||||
display-name: "{group_color} {enchant}"
|
||||
lore:
|
||||
- "&7Description:"
|
||||
- "{description}"
|
|
@ -4,5 +4,5 @@ main: com.songoda.epicenchants.EpicEnchants
|
|||
authors: [GB6]
|
||||
website: https://songoda.com/
|
||||
depend: [Vault]
|
||||
softdepend: [UltimateBottles]
|
||||
softdepend: [UltimateBottles, PlaceholderAPI]
|
||||
api-version: 1.13
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>hooks</artifactId>
|
||||
<groupId>com.songoda</groupId>
|
||||
<version>1.0.4-ALPHA</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>FactionsUUID</artifactId>
|
||||
|
||||
|
||||
</project>
|
|
@ -1,4 +0,0 @@
|
|||
package com.songoda.epicenchants.hooks;
|
||||
|
||||
public class FactionsUUIDHook {
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicEnchants-Parent</artifactId>
|
||||
<groupId>com.songoda</groupId>
|
||||
<version>1.0.4-ALPHA</version>
|
||||
</parent>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>FactionsUUID</module>
|
||||
</modules>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hooks</artifactId>
|
||||
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue