package net.saltymc.eaa.commands; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import com.mojang.brigadier.context.CommandContext; import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource; import net.minecraft.text.Text; import net.saltymc.eaa.function.TagFunction; import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal; public class ReloadCommand extends EaaModCommand{ @Override public int run(CommandContext context) { FabricClientCommandSource source = context.getSource(); try { TagFunction.getHashMap().clear(); source.sendFeedback(Text.of("Reloaded!")); } catch (Exception e) { source.sendFeedback(Text.of(e.toString())); } return 1; } @Override public LiteralArgumentBuilder getCommandSpecification() { return literal("/reload").executes(this); } }