001package fr.aumgn.dac2.game;
002
003import fr.aumgn.bukkitutils.timer.Timer;
004import fr.aumgn.dac2.DAC;
005
006public class GameTimer extends Timer {
007
008    private final Game game;
009
010    public GameTimer(DAC dac, Game game) {
011        super(dac.getPlugin(), dac.getConfig().getTimerConfig(),
012                dac.getConfig().getTimeOut());
013        this.game = game;
014    }
015
016    public GameTimer(DAC dac, Game game, Runnable runnable) {
017        super(dac.getPlugin(), dac.getConfig().getTimerConfig(),
018                dac.getConfig().getTimeOut(), runnable);
019        this.game = game;
020    }
021
022    @Override
023    public void sendTimeMessage(String string) {
024        game.sendMessage(string);
025    }
026}