Skip to content

Interval & Delay

Thérence F edited this page Apr 25, 2018 · 3 revisions

You have some trouble with interval and delay ? Or you just want to learn more about them ? No problem, i will try to explain in a better way how it works :

  • interval — specify how many seconds the plugin have to wait before broadcast the message again.
  • delay — allows you to add a 'time lag' to a message. So if we have one message with a time lag of 10 seconds and another one with a time lag of 0, the first message will be broadcast 10 seconds after the second one (note for pros : this is true only if they have the same interval).

Example:

'announcement1':
  interval: 60
  delay: 10
  message: "I am an announcement"
  type: announce
  servers:
    - 'all'

We will try to understand what it does line by line:

  1. This announcement is called 'announcement1'.
  2. It will be broadcasted every 60 seconds.
  3. The scheduled task that consist to broadcast it every 60 seconds will begin 10 seconds after the server has start.
  4. The announcement will be "I am an announcement".
  5. The announcement's type is "announce".
  6. This announcement will be displayed on all servers.

We will take one more example:

Imagine that you want to display messages following this cycle:

  • display message 1
  • wait 10 seconds
  • display message 2
  • wait 10 seconds
  • display message 1
  • wait 10 seconds
  • display message 2
  • wait 10 seconds
  • etc ...

You can see that message 1 and message 2 are displayed every 20 seconds with a shift of 10 seconds.

So, message 1 will need to have an interval of 20 and a delay of 0. And message 2 will need to have an interval of 20 and a delay of 10.

That's all for the notions of interval and delay. Feel free to contact me if you have any more questions.

~Thanks for reading.

Clone this wiki locally