aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/command/exception/MooCommandException.java
blob: fcf2283a6059b90b29c0241d0ffed61806709d38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package de.cowtipper.cowlection.command.exception;

import net.minecraft.command.CommandException;
import net.minecraft.util.EnumChatFormatting;

public class MooCommandException extends CommandException {
    private final String msg;

    public MooCommandException(String msg) {
        super("cowlection.commands.generic.exception", msg);
        this.msg = msg;
    }

    @Override
    public String getLocalizedMessage() {
        return EnumChatFormatting.getTextWithoutFormattingCodes(this.msg);
    }
}