TaskChain is a Java Control Flow framework designed for Game Developers.
TaskChain helps facilitate running tasks on an application's "Main Thread", and parallel tasks off the main (async to main).
You define a series of tasks (a Task Pipeline) in the order that they should execute, and the registration of each task defines whether it should run on the main thread or not.
TaskChain then executes your task pipe line, switching thread context where needed, passing the result from the previous task to the next.
- Why you should use TaskChain
- Learning TaskChain Terminology
- Using TaskChains & Examples
- Shared Task Chains
- Bukkit based Minecraft Servers (Bukkit/Spigot/Paper)
- Sponge Minecraft Servers
- Forge Minecraft Servers [#2]
- Nukkit Minecraft Servers [#13]
If you wish to add support for your own game, see Implementing a new game
JavaDocs can be found at http://taskchain.aikar.co
Please see CHANGELOG
Get off your dinosaur and get on this rocket ship!
On a serious note, Lambdas provided a much cleaner API and easier implementations.
Dinosaurs have been dead for a long time, so get off it before you start to smell.
If you are a developing Bukkit plugins in Kotlin, we actually do not recommend using TaskChain. @okkero has created a vastly better experience using Coroutines in Kotlin.
We recommend using his framework, Skedule, which requires Kotlin 1.1.
Coroutines are a beautiful way to create this kind of behavior, but sadly we are not able to do that kind of stuff in Java Syntax.
Note that Skedule is only for Bukkit plugins. If you are working in a different platform, TaskChain does still work for Kotlin.
- Go to Skedule
v2: Updated to a Java 8 Lambda API. Massive redesign and new features. Very close to v3 but uses a static registration and global state, so it can only be bound to a single Bukkit Plugin
(note: some bugs were fixed in v3 with Shared chains done and error handlers)
v1: The original (ugly) API for Bukkit plugins, pre Java 8. Only version usable below java 8, but probably some bugs.
TaskChain (c) Daniel Ennis (Aikar) 2014-2017.