Solved TownyAdvanced Format Town Name in PlaceholderAPI

Discussion in 'Spigot Plugin Help' started by SteveZR963, Jan 7, 2020.

  1. I've got the towny names to appear on FeatherBoard but they appear surrounded with square brackets, e.g. [Town Name].

    Is there anyway to remove the brackets?

    I've looked in the PlaceholderAPI files and FeatherBoard files (files including config.yml and relevant placeholder ymls).

    I'm using the {placeholderapi_townyadvanced_town} placeholder on my FeatherBoard. I've also looked at the PlaceholderAPI and Towny wikis to check for answers. The only alternate (townyadvanced_town_formatted) just adds the size of the town to the name (between the brackets).

    Any help will be appreciated.
     
  2. I've never used Towny but maybe you can modify the placeholder output in the plugin file ?
    Else, I guess you can use the Javascript function of PAPI to take the placeholder and remove the brackets and then show it on FeatherBoard with {placeholderapi_javascript_<yourjsplaceholder>}
     
  3. The brackets are part of the format set on them in the towny config.yml

    Code (Text):
      papi_chat_formatting:
        # When using PlaceholderAPI, and a tag would show both nation and town, this will determine how they are formatted.
        both: '&f[&6%n&f|&b%t&f] '
        # When using PlaceholderAPI, and a tag would showing a town, this will determine how it is formatted.
        town: '&f[&b%s&f] '
        # When using PlaceholderAPI, and a tag would show a nation, this will determine how it is formatted.
        nation: '&f[&6%s&f] '
     
    • Agree Agree x 1