Skip to content
FigTPublic

About

A library that allows you to 'mesh' together a series of tasks, whilst switching thread contexts.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Repository files navigation

Mesh

logo

Maven Central Version GitHub Code Size GitHub License

Mesh is a library that allows you to 'mesh' together a series of tasks, whilst switching thread contexts. It closely resembles the CompletableFuture class, except with the ability to switch between sync (main server thread) and async thread contexts, add delays between tasks, and more.

Put more plainly, it's a Minecraft-based abstraction of the CompletableFuture class.

Usage

It's recommended to shade & relocate it to avoid conflicts with other plugins!

Browse through the code or an example here, and on the wiki page here.

Maven repository is on Maven Central

(More documentation and examples coming soon)

Platforms

Requirements:

  • Java 17+

Bukkit

This implementation of Mesh uses the BukkitScheduler to execute tasks.

Dependency:

    implementation("us.figt:mesh-bukkit:<version>")

Sponge

This implementation of Mesh uses the Sponge API's Scheduler to execute tasks.

Dependency:

    implementation("us.figt:mesh-sponge:<version>")

Velocity

This implementation of Mesh uses Velocity's Scheduler to execute tasks, although as Velocity doesn't have a "main" thread, all tasks are executed "asynchronously" (that is, not on a main thread). This exists just to allow Mesh to be used in multiple scenarios.

Dependency:

    implementation("us.figt:mesh-velocity:<version>")

Building

Requirements

  • Java 17+

Use gradlew build to build all modules

Contributing

PRs are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

A library that allows you to 'mesh' together a series of tasks, whilst switching thread contexts.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages