Set duration of ActionBar

Discussion in 'Spigot Plugin Development' started by Bolt, May 20, 2015.

  1. Hi there. I was wondering if it was possible to set the duration of an action bar's visibility. I know this is possible with a TitleBar using its constructor but I can't seem to find a constructor/method to do the same thing with an actionbar.
     
  2. clip

    Benefactor

    There is no method to set the display time of the actionbar. You will need to create a repeating task that sends the same actionbar message over and over to show it for a certain duration.
     
    • Like Like x 1
  3. I found a solution which involves scheduling a repeating task to constantly send the same message but I was wondering if there was a better method.
     
  4. clip

    Benefactor

    Nope, that is what I also do in my plugin ActionAnnouncer and it works just fine. You need to find the right delay between messages though if you want to send it for a certain amount of seconds as the message will be shown for x ticks after the last loop in your task.
     
  5. Oh I see. Thanks! :)