aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/command/ReplyCommand.java
blob: e37ce85780cc253ac8a9e82ba41c9cbf498dd893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package de.cowtipper.cowlection.command;

import de.cowtipper.cowlection.Cowlection;
import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;

public class ReplyCommand extends CommandBase {
    private final Cowlection main;

    public ReplyCommand(Cowlection main) {
        this.main = main;
    }

    @Override
    public String getCommandName() {
        return "rr";
    }

    @Override
    public String getCommandUsage(ICommandSender sender) {
        return "/rr <message>";
    }

    @Override
    public void processCommand(ICommandSender sender, String[] args) throws CommandException {
        Minecraft.getMinecraft().thePlayer.sendChatMessage("/r " + CommandBase.buildString(args, 0));
    }

    @Override
    public int getRequiredPermissionLevel() {
        return 0;
    }
}