Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Countdown countdownCooldown = new Countdown(720) {
- @Override
- protected void onTick() {
- PlayerCache cache = PlayerCache.getCache(event.getPlayer());
- cache.setTimeLeft(this.getCountdownSeconds());
- System.out.println("Cooldown for " + event.getPlayer().getName() + " time left: " + cache.getTimeLeft());
- }
- @Override
- protected void onEnd() {
- PlayerCache cache = PlayerCache.getCache(event.getPlayer());
- cache.setCooldown(false);
- cache.setTimeLeft(0);
- }
- };
- countdownCooldown.launch();
Advertisement
Add Comment
Please, Sign In to add comment