branch | status | version | download |
---|---|---|---|
master | Download latest release | ||
development | Download snapshots |
MCCoroutine is an extension to bukkit and sponge server implementations (Spigot, Paper, SpongeVanilla, SpongeForge etc.) to use Kotlin Coroutines (async,await) for all common operations.
Examples:
// Allows to prepend suspend to any listener function.
class PlayerConnectListener : Listener {
@EventHandler
suspend fun onPlayerJoinEvent(playerJoinEvent: PlayerJoinEvent) {
}
}
// Adds a new interface for suspendable command executors
class AdminCommandExecutor: SuspendingCommandExecutor {
override suspend fun onCommand(sender: CommandSender,command: Command,label: String,args: Array<out String>): Boolean {
return false
}
}
- Documentation
- MCCoroutine JavaDocs for the Bukkit-API
- MCCoroutine JavaDocs for the Sponge-API
- Article on custom frameworks
- Full implementation of Kotlin Coroutines (async/await)
- Extension functions for already established functions
- Connection to events, commands, schedulers
- Coroutine LifeCycle scope for plugins (supports plugin reloading)
- No NMS
- Support for Minecraft 1.7 - Latest
- Support for Java 8
- Fork the MCCoroutine project on github and clone it to your local environment
- Install Java 8+
- Execute gradle sync for dependencies
The source code is licensed under the MIT license.