Newer
Older
ChallengeSystem / src / main / java / de / fanta / challenges / commands / timer / TimerGetCommand.java
@fanta fanta on 31 May 2024 978 bytes more components :')
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 net.kyori.adventure.text.Component;
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.sendMessage(sender, Component.text("Timer: ", ChatUtil.GREEN).append(plugin.getTimer().formatTime(ChatUtil.BLUE).append(Component.text(" Speedrun: " + (Config.getBoolean("editsettings") ? "Nein" : "Ja"), ChatUtil.ORANGE))));
        return true;
    }
}