Chapter 10Schedule Tasks for Later

In this chapter you’ll learn more about objects, classes, and scheduling tasks that will run later. You’ll add this knowledge to your toolbox:

  • How to create a separate class

  • How to schedule a task object to run later

  • How to schedule a task object to keep running later

Your toolbox is nearly complete now. You can write some really cool plugins just based on what we’ve done so far.

Now we’ll talk about how to make things happen in Minecraft that aren’t in direct response to either an event or a user-issued command: how to schedule tasks that will happen sometime in the future—and even keep running—all on their own. This feature helps you implement things that seem to act independently, like attacking ...

Get Learn to Program with Minecraft Plugins, 2nd 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.