TimerAPI
作者:rebot | 分类:模组
Minecraft 版本: 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.2 1.9.3 1.9.4 1.10 1.10.1 1.10.2 1.11 1.11.1 1.11.2 1.12 1.12.1 1.12.2 1.13 1.13.1 1.13.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4
平台: bukkit paper purpur spigot
标签: library minigame utility
TimerAPI
An api easily create and coding as simple to timer.
Features
- On start, end and tick handling
- Method chain writing
- Some utility methods
- Run timer as async
Usage
Add below to build.gradle.kts.
repositories {
maven("https://repo.chihuyu.love/snapshots/")
}
dependencies {
compileOnly("love.chihuyu:TimerAPI:1.4.1-SNAPSHOT")
}
Example
// this timer length is 180 * 20(1sec) = 3600tick(3min)
val timer = TimerAPI.build("wait ramen", duration = 180, period = 20, delay = 0)
.start {
hotWater.drip()
}
.tick {
some()
}
.end {
ramen.eat()
}
timer.run()
Support
If you need any help or want to share some ideas to add, just DM me!
Discord: @hirosukt
请登录后举报
暂无评论,抢个沙发吧~