Hey guys. Im a moderate Java developer and a newish bukkit developer. Is it possible to add Threads to the server without a client mod? It seems like it should be, but Im not sure. The threads do not actually do anything important per say, but they call different methods from the main mc thread. Thanks!
Code: Bukkit.getScheduler(); // This class is related to timers within the minecraft ticks. // for example Bukkit.getScheduler().scheduleAsyncRepeatingTask(plugin, runnable, delay, interval); // this will start a repeating timer which will start after --delay-- ticks, // and repeat it every --interval-- ticks. // if you didn't know, 20 minecraft ticks is 1 real life second. have fun!
Scheduler.scheduleAsyncRepeqatingTask will cause your task to be executed in a thread separate from the main game thread. Be careful that you don't modify the game from a separate thread. The results are not defined and you can corrupt the server.