How to make this loop?

Discussion in 'Plugin Development' started by ArthurHoeke, Sep 28, 2014.

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

    ArthurHoeke

    Closed

    Bumb

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  2. Offline

    Zupsub

    A loop becomes more difficult, you'd have to change the string yourself every few ticks, so "ABCD" => "BCDE" => "CDEF" => "DEFA" and so on.
    Same goes for color, so with a few ticks one more letter is colored.
     
    Datdenkikniet likes this.
  3. Offline

    ArthurHoeke

    Zupsub Can you give me a code example please?
     
  4. Offline

    Skionz

    ArthurHoeke We aren't going to spoon feed you. Is your question how to make this without BarAPI? Or schedule the bar to change every few seconds?
     
  5. Offline

    ArthurHoeke

    Skionz I want to use BarAPI for this, But my question is how to change the bossbar message color every x seconds
     
  6. Offline

    Zupsub

    Look for Bukkit Scheduler. It has it's own wiki page.
     
  7. Offline

    ArthurHoeke

    Zupsub Altready looked at that but I dont see a way to do it with that
     
  8. Offline

    Gater12

    ArthurHoeke
    Schedule a repeating task every x seconds which changes the bar message.
     
  9. Offline

    Skionz

    ArthurHoeke Pretty basic logic. Not sure how bar api works but basically you would spawn an enderdragon client side to create the bar. Then every 5 seconds you would remove the client side dragon and spawn a new one with a different name.
     
  10. Offline

    ArthurHoeke

    Skionz I know, But how to change the text? Beceause you can just make a scheduler but how to let it change in a specific order
     
  11. Offline

    Skionz

    Remove the enderdragon which barAPI probably has a method for then create a new dragon and change the name like that.
    EntityEnderDragon#setCustomName()
    I have no idea how to do it with BarAPI. Go read the documentation I am sure they have a method for it
     
  12. Offline

    ArthurHoeke

    Skionz I know this already! I know how barapi works, But the problem is is how can I make that it changes the text in a certain serie? Like when the text is Test with the t green, The next text must be Test with the e green too
     
  13. Offline

    Zombieghost_391

    I'm to lazy to help but this guy made a great tutorial on what you'r wanting to know
     
  14. Offline

    ChipDev

    Copy paste alot of strings xP
     
    FabeGabeMC likes this.
  15. Offline

    Rocoty

  16. Offline

    FabeGabeMC

    ChipDev
    Or just use substring.
     
    ChipDev likes this.
Thread Status:
Not open for further replies.

Share This Page