animalrpfabric/src/main/java/ovh/sad/animalrp/commands/InfoCommand.java

35 lines
No EOL
2.1 KiB
Java

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<ServerCommandSource> dispatcher, CommandRegistryAccess registryAccess,
CommandManager.RegistrationEnvironment environment) {
dispatcher.register(CommandManager.literal("rpinfo").executes(context -> {
context.getSource().sendFeedback(() -> AnimalRP.parseText("<bold><green>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("<green>-</green> To select a animal, use: /tf"), false);
context.getSource().sendFeedback(() -> AnimalRP.parseText("<green>-</green> To turn off animals, use: /tf off"), false);
context.getSource().sendFeedback(() -> AnimalRP.parseText("<green>-</green> Don't want the chat changes? Use: /disableanimalchat."), false);
context.getSource().sendFeedback(Text::empty, false);
context.getSource().sendFeedback(() -> AnimalRP.parseText("<green>-</green> To see what the animals do, visit: https://git.sad.ovh/sophie/animalrpfabric"), false);
context.getSource().sendFeedback(() -> AnimalRP.parseText("<green>-</green> 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;
}));
}
}