mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
Exception messages now formatted better.
This commit is contained in:
parent
40fff5c241
commit
020dee2ab0
@ -1,20 +1,21 @@
|
||||
package com.mvplugin.core;
|
||||
|
||||
import com.dumptruckman.minecraft.pluginbase.messaging.BundledMessage;
|
||||
import com.dumptruckman.minecraft.pluginbase.messaging.ChatColor;
|
||||
|
||||
public class MultiverseException extends Exception {
|
||||
|
||||
private final BundledMessage languageMessage;
|
||||
|
||||
|
||||
public MultiverseException(BundledMessage languageMessage) {
|
||||
super(languageMessage.getMessage().getDefault().get(0));
|
||||
this.languageMessage = languageMessage;
|
||||
public MultiverseException(BundledMessage b) {
|
||||
super(String.format(ChatColor.translateAlternateColorCodes('&', b.getMessage().getDefault().get(0)), b.getArgs()));
|
||||
this.languageMessage = b;
|
||||
}
|
||||
|
||||
public MultiverseException(BundledMessage languageMessage, Throwable throwable) {
|
||||
super(languageMessage.getMessage().getDefault().get(0), throwable);
|
||||
this.languageMessage = languageMessage;
|
||||
public MultiverseException(BundledMessage b, Throwable throwable) {
|
||||
super(String.format(ChatColor.translateAlternateColorCodes('&', b.getMessage().getDefault().get(0)), b.getArgs()), throwable);
|
||||
this.languageMessage = b;
|
||||
}
|
||||
|
||||
public BundledMessage getBundledMessage() {
|
||||
|
Loading…
Reference in New Issue
Block a user