dfghjkl;'
This commit is contained in:
parent
baf8d849b6
commit
412cabff8a
23 changed files with 706 additions and 18 deletions
|
@ -0,0 +1,32 @@
|
|||
package me.kawaiizenbo.moonlight.command.commands;
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
||||
import me.kawaiizenbo.moonlight.command.Command;
|
||||
import me.kawaiizenbo.moonlight.command.CommandManager;
|
||||
import me.kawaiizenbo.moonlight.util.ChatUtils;
|
||||
import me.kawaiizenbo.moonlight.util.ColorUtils;
|
||||
import net.minecraft.command.CommandSource;
|
||||
|
||||
public class Help extends Command
|
||||
{
|
||||
public Help()
|
||||
{
|
||||
super("help", "Gives you a list of all of the commands");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(LiteralArgumentBuilder<CommandSource> builder)
|
||||
{
|
||||
builder.executes(context ->
|
||||
{
|
||||
for (Command cmd : CommandManager.get().getAll()) {
|
||||
ChatUtils.sendMsg(ColorUtils.aqua + "Command: " + ColorUtils.gray + cmd.getName());
|
||||
ChatUtils.sendMsg(ColorUtils.gray + cmd.getDescription());
|
||||
}
|
||||
return SINGLE_SUCCESS;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue