Chapter 10. The Bukkit Scheduler

The Bukkit scheduler is a very powerful tool, and it is easy to learn how to use it. It allows you to create repetitive tasks such as saving data. It also allows you to delay how long until a block of code is executed. The Bukkit scheduler can also be used to asynchronously compute lengthy tasks. This means that a task such as writing data to a file or downloading a file to the server can be scheduled to run on a separate thread to prevent the main thread, and thus the game, from lagging. In this chapter, you will learn how to do each of these by continuing to work on the Warper teleportation plugin, as well as creating a new plugin called AlwaysDay. This new plugin will ensure that it is always daytime on the ...

Get Building Minecraft Server Modifications - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.