Skip to content

Commit 7a26cd8

Browse files
Fix event append issue for custom item display
1 parent e55b4c9 commit 7a26cd8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,13 @@ private ComponentBuilder append(BaseComponent component, ComponentBuilder.Format
439439
if (component.isReset() && retention == ComponentBuilder.FormatRetention.ALL) {
440440
retention = ComponentBuilder.FormatRetention.EVENTS;
441441
}
442+
443+
//Hacky method to replace dummy components
444+
if (previous == null && builder.getCursor() == -1) {
445+
previous = new TextComponent("");
446+
builder.append(previous);
447+
}
448+
442449
if (previous != null && (!component.isReset() || retention == ComponentBuilder.FormatRetention.EVENTS)) {
443450
component.copyFormatting(previous, retention, false);
444451
parts.add(component);

0 commit comments

Comments
 (0)