I have been coding for a long time, but I just started coding bukkit plugins. If I make a main function will it still be the main? I noticed that there are some really weird function names. Is there a special name for the main function in bukkit is what I guess to say.
jmaster2012 Since the main function gets executed on program start, it can't be used in a plugin, because the server is already running (I know you can call it later still, but there's no reason to). Therefor bukkit has some entry methods which get called when the plugin is enabled (onEnabled).
Ok thank you. I thought that was like the start function. So if I put a timer in the onEnabled function will it always go through the loop?
Do you want that kind of functionality? There's a builtin way to schedule a repeating clock function that gets called every so often; look up the bukkit scheduler. As for onEnable, you should never call commands that are meant to be called by bukkit, like onEnable.
jmaster2012 I wouldn't necessarily use a timer as bukkit has it's on way of dealing with that, but yeah it would.
basically I am making a plugin for looping through 5 global spawn points and it changes every five minutes. I am still confused. I am new to bukkit coding
You could schedule a task which would run every 5 min (5 min * 60 sec * 20 ticks/sec = 6000) so every 6000 server ticks. Inside the task you could just set the locations to new ones easily. See here for scheduling the task: http://jd.bukkit.org/rb/doxygen/df/...eduler.html#a0e40059453e3661420903e185d4db093