Stopwatch Module
Overview
The stopwatch module allows you to control the stopwatch mod inside Lunar Client.
- Ability to fully control a player's stopwatch mod.
- Start a player's stopwatch
- Stop a player's stopwatch
- Reset a player's stopwatch
Start, Stop, and Reset the Lunar Client stopwatch mod!
Integration
Sample Code
Explore each integration by cycling through each tab, to find the best fit for your requirements and needs.
Start Stopwatch
public void startStopwatchExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(this.stopwatchModule::startStopwatch);
}
Stop Stopwatch
public void stopStopwatchExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(this.stopwatchModule::stopStopwatch);
}
Reset Stopwatch
public void resetStopwatchExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(this.stopwatchModule::resetStopwatch);
}