Solved How to get the potion effect and rename it in config

Discussion in 'Plugin Development' started by mAndAle, Jun 11, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    mAndAle

    hello to everyone, i have one question, how can i get the PotionEffectType with replace in config?

    I've tried this:
    Code:
    p.sendMessage(ChatColor.translateAlternativeCodes('&', Main.plugin.getConfig().getString(Active-potion).replace("%effect%" String.valueof(PotionEffectType.Slow_Mining))));
    but return me a strange potion effect (it's always the same but with the amplier and ecc..)
    The question is how can i get only the name?
     
  2. Offline

    timtower Administrator Administrator Moderator

    @mAndAle
    PotionEffectType.Slow_Mining.name()
     
  3. Offline

    mAndAle

    Ok, thanks
     
Thread Status:
Not open for further replies.

Share This Page