aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/ResetRepoCommand.java
blob: 9e8363fb6ab970834fa02140e4aa7a2c29fdf855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package io.github.moulberry.notenoughupdates.commands.dev;

import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;

public class ResetRepoCommand extends ClientCommandBase {

	public ResetRepoCommand() {
		super("neuresetrepo");
	}

	@Override
	public void processCommand(ICommandSender sender, String[] args) throws CommandException {
		NotEnoughUpdates.INSTANCE.manager
			.userFacingRepositoryReload()
			.thenAccept(strings ->
				strings.forEach(line ->
					sender.addChatMessage(new ChatComponentText("§e[NEU] " + line))));
	}
}