Fix IllegalStateException in meta info command - closes #385

This commit is contained in:
Luck 2017-07-22 00:00:58 +01:00
parent 3c44388883
commit 65b0d45738
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -142,11 +142,11 @@ public class MetaInfo extends SharedSubCommand {
String location = processLocation(e.getValue(), holder);
if (e.getValue().hasSpecificContext()) {
String context = Util.getAppendableNodeContextString(e.getValue());
Component component = ComponentSerializer.parseFromLegacy(Message.CHAT_META_ENTRY_WITH_CONTEXT.asString(sender.getPlatform().getLocaleManager(), e.getKey(), e.getValue().getPrefix().getValue(), location, context), Constants.COLOR_CHAR);
Component component = ComponentSerializer.parseFromLegacy(Message.CHAT_META_ENTRY_WITH_CONTEXT.asString(sender.getPlatform().getLocaleManager(), e.getKey(), type.getEntry(e.getValue()).getValue(), location, context), Constants.COLOR_CHAR);
component.applyRecursively(makeFancy(type, holder, label, e.getValue()));
sender.sendMessage(component);
} else {
Component component = ComponentSerializer.parseFromLegacy(Message.CHAT_META_ENTRY.asString(sender.getPlatform().getLocaleManager(), e.getKey(), e.getValue().getPrefix().getValue(), location), Constants.COLOR_CHAR);
Component component = ComponentSerializer.parseFromLegacy(Message.CHAT_META_ENTRY.asString(sender.getPlatform().getLocaleManager(), e.getKey(), type.getEntry(e.getValue()).getValue(), location), Constants.COLOR_CHAR);
component.applyRecursively(makeFancy(type, holder, label, e.getValue()));
sender.sendMessage(component);
}