package ovh.sad.animalrp.commands; import java.util.UUID; import com.mojang.brigadier.CommandDispatcher; import eu.pb4.placeholders.api.TextParserUtils; import eu.pb4.placeholders.api.parsers.TagParser; import net.minecraft.command.CommandRegistryAccess; import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.text.Text; import ovh.sad.animalrp.AnimalRP; import ovh.sad.animalrp.animals.Animal; import ovh.sad.animalrp.util.HashmapStore; public class InfoCommand { public void Command(CommandDispatcher dispatcher, CommandRegistryAccess registryAccess, CommandManager.RegistrationEnvironment environment) { dispatcher.register(CommandManager.literal("rpinfo").executes(context -> { context.getSource().sendFeedback(() -> AnimalRP.parseText("AnimalRPs is a mod that adds animals to Minecraft."), false); context.getSource().sendFeedback(() -> AnimalRP.parseText("Usage of this mod is very simple."), false); context.getSource().sendFeedback(() -> AnimalRP.parseText("- To select a animal, use: /tf"), false); context.getSource().sendFeedback(() -> AnimalRP.parseText("- To turn off animals, use: /tf off"), false); context.getSource().sendFeedback(() -> AnimalRP.parseText("- Don't want the chat changes? Use: /disableanimalchat."), false); context.getSource().sendFeedback(Text::empty, false); context.getSource().sendFeedback(() -> AnimalRP.parseText("- To see what the animals do, visit: https://git.sad.ovh/sophie/animalrpfabric"), false); context.getSource().sendFeedback(() -> AnimalRP.parseText("- To pet someone, rightclick on them (they must be a animal!)"), false); context.getSource().sendFeedback(Text::empty, false); context.getSource().sendFeedback(() -> AnimalRP.parseText("To see available animals, run /tf"), false); return 0; })); } }