Newer
Older
ChallengeSystem / src / main / java / de / fanta / challenges / commands / timer / TimerGetCommand.java
@fanta fanta on 20 Sep 2022 851 bytes fix timer get command
package de.fanta.challenges.commands.timer;

import de.fanta.challenges.Challenges;
import de.fanta.challenges.utils.ChatUtil;
import de.fanta.challenges.utils.Config;
import de.iani.cubesideutils.bukkit.commands.SubCommand;
import de.iani.cubesideutils.commands.ArgsParser;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public class TimerGetCommand extends SubCommand {

    private final Challenges plugin;

    public TimerGetCommand(Challenges plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String alias, String commandString, ArgsParser args) {
        ChatUtil.sendNormalMessage(sender, "Timer: " + plugin.getTimer().formatTime() + " Speedrun: " + (Config.getBoolean("editsettings") ? "Nein" : "Ja"));
        return true;
    }
}