Main Class?

Discussion in 'Plugin Development' started by jmaster2012, Jan 6, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    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.
  2. Offline


    The contradiction of the original post is too much.
  3. 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).
    jmaster2012 likes this.
  4. Offline


    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?
  5. Offline


    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.
  6. jmaster2012 I wouldn't necessarily use a timer as bukkit has it's on way of dealing with that, but yeah it would.
  7. Offline


    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
  8. Offline


Thread Status:
Not open for further replies.

Share This Page