diff options
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/command/exception')
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/command/exception/MooCommandException.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/command/exception/MooCommandException.java b/src/main/java/de/cowtipper/cowlection/command/exception/MooCommandException.java index f16e488..fcf2283 100644 --- a/src/main/java/de/cowtipper/cowlection/command/exception/MooCommandException.java +++ b/src/main/java/de/cowtipper/cowlection/command/exception/MooCommandException.java @@ -1,9 +1,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); } } |