Solved Can I do this with FeatherBoard?

Discussion in 'Spigot Plugin Help' started by Itaquito, Sep 23, 2018.

  1. Hey! I need some help with featherbord.

    So, im trying to show multiple lines only when a placeholder has a specific text.
    For example if a placeholder has a text like "Hello, Im a placeholder" featherboard will show a line.

    Is this posible? If yes, How I can do it?
     
  2. What you're asking for is an if... then... statement which Featherboard does not support.
    This could probably be done with a third-party plugin.

    EDIT:
    You could also attempt to do this with two different scoreboards and switch between the two.
     
  3. You can make effects with JS, but Im not sure how that part works.
     
  4. You can make a script with JS to set up the scoreboard but I do not believe there is a way to read a placeholder's string inside the JavaScript. Correct me if I'm wrong, but I'm pretty sure Featherboard applies the placeholders after processing the JS.
     
  5. You can do that with a JavaScript placeholder from PlaceholderAPI
    Tell me if u need help with doing that
     
  6. The problem with that is that I cant hide line, I can just set it empty.

    In the FeatherBoard page it says this
    Code (Text):
    You can not dynamically add or remove lines. You can however show or hide lines giving the same effect.
    So I guess I can hide lines with the same effect?

    Edit:
    I have this problem because im using a placeholder of placeholderAPI with mvdwplaceholderAPI
    So when I have {placeholderapi_placeholderhere} It shows the placeholder, all good. But when the placeholder gets remove by the plugin, or the plugin is not using it anymore it displays %placeholderhere% and I would like to just remove the line when the placeholder is not set.
     
    #6 Itaquito, Sep 23, 2018
    Last edited: Sep 23, 2018
  7. oh yea u cant remove the whole line u can return empty line
    sorry misunderstand what u want
     
  8. Maximvdw

    Benefactor

    just hide the lines when the placeholder doesnt contain the word

    users often do this for factions, where they show two lines for the owner and level when they are actually in a faction
     
    • Like Like x 1
  9. Can you show me an example of how to do this?

    I already looked on some of the wiki pages and I found something about "dynamic visibility" but I dont find more information. :c
     
    #9 Itaquito, Sep 24, 2018
    Last edited: Sep 25, 2018
    • Like Like x 1
  10. I found it, it was this:


    Code (Text):
    - '|visible:true|Test'
     
    solved