mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-25 06:01:40 +01:00
Added %ecoenchants_<spell>_cooldown% placeholder
This commit is contained in:
parent
bca7461101
commit
17adc3a1c3
@ -1,5 +1,8 @@
|
||||
package com.willfp.ecoenchants.enchantments.itemtypes;
|
||||
|
||||
import com.willfp.eco.util.StringUtils;
|
||||
import com.willfp.eco.util.integrations.placeholder.PlaceholderEntry;
|
||||
import com.willfp.eco.util.integrations.placeholder.PlaceholderManager;
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.display.EnchantmentCache;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
@ -57,6 +60,13 @@ public abstract class Spell extends EcoEnchant {
|
||||
protected Spell(@NotNull final String key,
|
||||
@NotNull final Prerequisite... prerequisites) {
|
||||
super(key, EnchantmentType.SPELL, prerequisites);
|
||||
|
||||
PlaceholderManager.registerPlaceholder(
|
||||
new PlaceholderEntry(
|
||||
this.getPermissionName() + "_" + "cooldown",
|
||||
player -> StringUtils.internalToString(getCooldown(this, player))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user