Introduction
SeptyrTimer is an easy-to-use API for timers, countdowns, cooldowns, etc. Its primary purpose is to avoid the chance of creating too many BukkitRunnables, which can eat up RAM. Additionally, the system technically isn't run on Minecraft ticks. Instead, it uses the precise time from the system. This means that your timers are 100% more reliable. Minecraft ticks are approximately 1/20 of a second. However, it's not perfect, and isn't reliable when working with timings longer than a minute.
How to Use
To create a timer, there are 2 options. You can create a timer using seconds, or ticks. If you do not provide a second argument after the tag, the Timer will default to running every tick.
This API introduces two events: TimerEvent and TickEvent. TimerEvent will run when any existing Timer object finishes. TickEvent will run every tick, which is easier to use than creating multiple BukkitRunnables.
The above code is an example of how to search for all running Timers with a specific tag. Timers can share tags for this purpose. This makes it easy to, say, cancel multiple Timers for the same function.
SeptyrTimer is an easy-to-use API for timers, countdowns, cooldowns, etc. Its primary purpose is to avoid the chance of creating too many BukkitRunnables, which can eat up RAM. Additionally, the system technically isn't run on Minecraft ticks. Instead, it uses the precise time from the system. This means that your timers are 100% more reliable. Minecraft ticks are approximately 1/20 of a second. However, it's not perfect, and isn't reliable when working with timings longer than a minute.
How to Use
To create a timer, there are 2 options. You can create a timer using seconds, or ticks. If you do not provide a second argument after the tag, the Timer will default to running every tick.
Code (Text):
// Create new Timer that will run every game tick
Timer timer_1 = new Timer("tickcounter");
// Create new Timer that will run every 60 seconds
Timer timer_2 = new Timer("server message", 60d);
// Create new Timer that will run every 30 ticks
Timer timer_3 = new Timer("cooldown", (short) 30);
Timer timer_1 = new Timer("tickcounter");
// Create new Timer that will run every 60 seconds
Timer timer_2 = new Timer("server message", 60d);
// Create new Timer that will run every 30 ticks
Timer timer_3 = new Timer("cooldown", (short) 30);
Code (Text):
String searchTag = "cooldown";
for (Timer t : SeptyrTimer.timers) {
if (t.tag == searchTag) {
// Retrieves each Timer with tag of "cooldown"
}
}
for (Timer t : SeptyrTimer.timers) {
if (t.tag == searchTag) {
// Retrieves each Timer with tag of "cooldown"
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
SeptyrTimer is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11. Downloaded 150 times (via Spigot). Download it and open it directly in the game.