Ok so iam setting up something that will Broadcast a Message every 10 minutes once it starts but the issue iam having is i want to broadcast like; Raid started 60 minutes left (10 minutes later) Raid started 50 minutes left how would i got about doing that as right now all i know how to do is send a message every 10 minutes
arnie231 I'm assuming that you are storing your minutes in a variable for the scheduled repeating task. What you will do is store 60 in a variable 'x', schedule the repeating task at 10 minute intervals and inside, subtract 10 from your variable (which is should now be 50), broadcast the time remaining using the variable 'x', and check if 'x' is equal to 0 and if it is, cancel the current repeating task.
Could i ask a quick question how do i add/subtract in Java/Bukkit and how would i check if it is a certain number ? Thank you
arnie231 These things are pretty basic. To add/subtract you would do something like this. Code: int number = 60; number = number - 10; //or number -= 10; Now to compare it, you would do something like this: Code: if (number == 0) { //if number equals 0 Note that one = is an assignment operator and == is a boolean operator. Use the former to store a value and the latter to return a boolean depending on whether the statement is true or false.