From 65b0d4573832f590466ffc2214f0eb19938819dd Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 22 Jul 2017 00:00:58 +0100 Subject: [PATCH] Fix IllegalStateException in meta info command - closes #385 --- .../luckperms/common/commands/impl/generic/meta/MetaInfo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java index 3e369082d..70cae7735 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java @@ -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); }