- Bukkit: Execute sync tasks immediately if the plugin is disabled (scheduled during onDisable())
- Added Predicate support to .abortIf style methods
- Added .abortChain() API so you can insert an abort point for dynamic chain creation.
- Added .configure(TaskChain<>) API so you can dynamically insert into chain without breaking fluent interface.
- Added Java Sources and Java Docs
- Removed the shading of core into -bukkit and -sponge. It will be shaded on user level anyways (so that it can pick up the javadocs)
- Fixed: Concurrency Issue with Shared Chains and double execution
- New: Futures API - Developers may use the Java 8 "Promise" API CompleteableFuture as a way to control chain execution instead of the AsyncExecuting Callback method. Futures are much more powerful than the Callback style.
- New: Data Wrappers - You may now use TaskChain.multi(result1, result2, result3) to return multiple values from a task, to be accessed on the next task. This replaces the need to use the Task Data map temporarily between tasks to pass multiple values.
- Experimental: Support for Sponge (#1) has been added using Sponge API v6.0.0-SNAPSHOT. This is untested.
- Rewrote the SharedTaskChain logic. All 3.x versions before this is assumed to have broken Shared Task Chain logic with rare concurrency issues.
- Fix POM files for dependencies to create the dependency reduced POM files to avoid double including in shade.
- Add abortIf() and .abortIfNot() API's. These behave like abortIfNull but allow you to check for a certain value.
- AbortAction interface was created to replace NullAction handlers, and TaskChainNullAction is now Deprecated
- Ability to set a default error handler on a Factory for all chains created by the factory to default to if they do not supply their own.
- TaskChain.getCurrentChain() now works in other user supplied methods such as Error Handlers, Done Handlers and Null Action Handlers.
- User supplied methods such as those handlers should now properly catch all exceptions and avoid ever corrupting the chain processing (mainly for shared chains, as an error in your error handler on a shared chain could break the backing chain and prevent other chains from running)
- Add TaskChain.getCurrentActionIndex() API. Pretty much every thing you add to the chain will bump the action index, so you may use this value in your error/done handlers to know how far down the chain you were when it aborted, and make judgement there.
- Getters and Setters for Error and Done handlers were made public so you can change those if you really see a reason to mid execution.
- No changes. Version bump as I appear to of accidentally deployed the parent POM using 3.0.1-SNAPSHOT
- First release as a proper GitHub Project
- TaskChain API is now platform agnostic
- Chain Creation no longer uses a static TaskChain.newChain() API. Implementations must create a factory
- Bugs with Shared Chains was fixed (unsafe concurrency, error handlers and done handlers may not of functioned correctly)
- TaskChain now uses its own Async Thread Pool
- During Shutdown of the game implementation, the shutdown process will block until the async queue is flushed. All chains will try to execute to completion on their current thread (will not switch back to main, since main will be blocked)
- .abortIfNull() now supports various "Actions". Game Implementations can provide common actions.
- A delay API based on real world time units added.
- Shared Chain helper methods that were based on Bukkit API removed.
- Artifacts will now be deployed to Aikar's nexus server and can be depended on without copying code to your project.
- Fixed bug where an exception in a task would not properly abort the chain, resulting in Shared Chains being forever stuck from executing.
- Changed the recent Error Handler to a BiConsumer to also pass the task that triggered the Exception (reason for minor bump)
- Fixed bug where Shared chains always executed next tick, breaking ability to execute synchronously
- While now unused internally, executeNext() will properly use 1 instead of 0 for next tick, as 0 can mean 'this tick' if scheduled inside of another bukkit scheduler task.
- Added Error Handler arguments to .execute(), so you can act on uncaught exceptions by your tasks.
- Added .returnChain() to the chain to also provide another way to access the chain in tasks, by passing the chain itself as an arg to the next task. chain.returnChain().async((chain) -> Object foo = chain.getTaskData("foo"); }).execute();
- Added Task.getCurrentChain() - get the currently executing chain in a task. Useful for generic tasks to get execution context.