Skip to content
프로젝트

소개

MCCoroutine은 Minecraft 서버 환경에서 Kotlin Coroutines를 폭넓게 지원하는 라이브러리입니다.

시스템 및 인프라

이 수치를 측정하는 방법

What you can do

  • 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)

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

MCCoroutine GitHub license

MCCoroutine is a library, which adds extensive support for Kotlin Coroutines for Minecraft Server environments.

Plugins for game servers and proxy servers often need to perform asynchronous operations (e.g. accessing databases) to be scalable for a large amount of players. MCCoroutine brings the full power of Kotlin Coroutines to them by extending the existing APIs with suspendable commands, events and schedules.

Supported Game Servers:

  • CraftBukkit
  • Fabric
  • Folia
  • Minestom
  • Paper
  • Spigot
  • SpongeVanilla v7.x.x
  • SpongeForge v7.x.x

Supported Proxies:

  • BungeeCord
  • Waterfall
  • Velocity

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
    }
}
// Adds a new extension function to switch into a suspendable plugin coroutine.
fun bar() {
    plugin.launch {
        delay(1000)
        bob()
    }
}

private suspend fun bob() {
}

Getting started

Resources

Features

  • 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+

Contributing

  • Fork the MCCoroutine project on GitHub and clone it to your local environment
  • Install Java 8+
  • Execute gradle sync for dependencies

Licence

The source code is licensed under the MIT license.

관련 프로젝트 살펴보기

불러오는 중…