Updated placeholders

This commit is contained in:
Auxilor
2022-01-17 19:11:55 +00:00
parent e38187be35
commit 39a213c727
3 changed files with 4 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche
/**
* Instance of EcoEnchants for enchantments to be able to access.
*/
@Getter(AccessLevel.PROTECTED)
@Getter
private final EcoEnchantsPlugin plugin = EcoEnchantsPlugin.getInstance();
/**

View File

@@ -110,6 +110,7 @@ public abstract class Spell extends EcoEnchant {
PlaceholderManager.registerPlaceholder(
new PlaceholderEntry(
this.getPlugin(),
this.getPermissionName() + "_" + "cooldown",
player -> StringUtils.internalToString(getCooldown(this, player))
)

View File

@@ -82,6 +82,7 @@ public class EnchantmentUtils {
public static void registerPlaceholders(@NotNull final EcoEnchant enchantment) {
PlaceholderManager.registerPlaceholder(
new PlaceholderEntry(
enchantment.getPlugin(),
enchantment.getPermissionName() + "_" + "enabled",
player -> String.valueOf(enchantment.isEnabled())
)
@@ -93,6 +94,7 @@ public class EnchantmentUtils {
PlaceholderManager.registerPlaceholder(
new PlaceholderEntry(
enchantment.getPlugin(),
enchantment.getPermissionName() + "_" + key,
player -> StringUtils.internalToString(object)
)