package org.royaldev.thehumanity.commands.impl;
import org.jetbrains.annotations.NotNull;
import org.kitteh.irc.client.library.event.channel.ChannelMessageEvent;
import org.royaldev.thehumanity.TheHumanity;
import org.royaldev.thehumanity.commands.InGameCommand;
import org.royaldev.thehumanity.game.TheHumanityGame;
import org.royaldev.thehumanity.player.TheHumanityPlayer;
import xyz.cardstock.cardstock.commands.CallInfo;
import xyz.cardstock.cardstock.commands.Command;
import java.util.List;
@Command(
name = "cardcounts",
description = "Displays the current amount of cards in the deck.",
aliases = {"cardcount", "cc"},
usage = "<command> (public)"
)
public class CardCountsCommand extends InGameCommand {
public CardCountsCommand(final TheHumanity humanity) {
super(humanity);
}
@Override
public void run(@NotNull ChannelMessageEvent event, @NotNull CallInfo callInfo, @NotNull TheHumanityGame game, @NotNull TheHumanityPlayer player, @NotNull List<String> arguments) {
if (arguments.size() > 0 && "public".equalsIgnoreCase(arguments.get(0))) {
game.showCardCounts();
} else {
player.getUser().sendNotice(game.getCardCounts());
}
}
}