Compatibility
Minecraft: Java Edition
1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
1.15.x
1.14.x
1.13.x
1.12.x
1.11.x
1.10.x
1.9.x
1.8.x
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Licensed ARR
Published 2 years ago
Updated last year
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