-
Notifications
You must be signed in to change notification settings - Fork 4
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:
- This announcement is called 'announcement1'.
- It will be broadcasted every 60 seconds.
- The scheduled task that consist to broadcast it every 60 seconds will begin 10 seconds after the server has start.
- The announcement will be "I am an announcement".
- The announcement's type is "announce".
- 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.
- If you find any bugs or issues, don't leave a bad rating, just private message me on the spigot forum or on my discord server and it'll be fixed as soon as possible.
- Have any suggestions? Leave them in the discussion page of the plugin, send me a private message using twitter or contact me at [email protected].