Discussion in 'Spigot Plugin Development' started by DomiHrajePL, Apr 28, 2019.

  1. Hello!

    How to replace placeholders from text from config ?

    For example:
    text: "&7%player_name%, hello!"

    I use
    String text = Main.getInstance().getConfig().getString("text").replace("&", "§");
    text = PlaceholderAPI.setPlaceholders(player, text);

    But this doesnt working...

    Thanks for help!!

    Sorry for my english! I'm Czech!

    - DomiHrajeCZ
    #1 DomiHrajePL, Apr 28, 2019
    Last edited: Apr 28, 2019
  2. SteelPhoenix


    Did you download the proper ecloud expansion?

    Also, the ChatColor enum exists for a reason.. you shouldn't use .replace("&", "§")
  3. Yes, i have downloaded expansion..
  4. Maybe its just an example, but you have different key names.