3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-26 00:00:55 +01:00
Velocity/api/src
4drian3d e45ca5f357
Improved Scheduler API (#696)
* Improved Scheduler API

- Added `Scheduler#builder(plugin)`
This method allows a more simplified builder while maintaining the main requirement of the executor plugin
- Added `Scheduler#taskByPlugin(plugin)`
Allows to obtain the tasks that a plugin has sent to execute and that are currently active
- Added `TaskBuilder#task(Consumer<SchuledTask>)`
Allows to specify a task with access to the task itself with the ability to cancel itself

* Applied requested changes

- Removed tasks builder method
- Added `Scheduler#buildTask(plugin, Consumer<ScheduledTask>)`

* Removed some unused imports

* Applied suggested change

* Fix possible test bug

* Applied more suggested changes

* Fixed tests inside tasks
2022-06-09 03:27:06 -04:00
..
ap Relicense the Velocity proxy under the terms of GPLv3 (#448) 2021-03-31 16:04:06 -04:00
main/java/com/velocitypowered/api Improved Scheduler API (#696) 2022-06-09 03:27:06 -04:00
test/java/com/velocitypowered/api Remove text 3.x API and associated deprecated APIs 2021-05-23 14:13:51 -04:00