Replace placeholders.

Discussion in 'Spigot Plugin Help' started by livepvp1234, Aug 4, 2018.

  1. Okay, so a while back i saw a thread how to replace the placeholders in java, but i cant seem to find it now anyone have any clue?
     
  2. Firstly what do you mean by placeholder?

    PlaceholderAPI or your own placeholders like %player% for example.

    For PAPI you can check this wiki https://www.spigotmc.org/wiki/hooking-into-placeholderapi/

    For own placeholders you can create simple method which will replace your placeholders in this string. For this one you can use either string.replace(x, y) or StringUtils.replace - second option is better in my opinion cause it's faster but it doesn't that much for Minecraft plugins :)