@Override public @NonNull ScoreComponent append(final @NonNull Component component) { this.detectCycle(component); // detect cycle before modifying final List<Component> children = new ArrayList<>(this.children.size() + 1); children.addAll(this.children); children.add(component); return new ScoreComponent(children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, this.hoverEvent, this.insertion, this.name, this.objective, this.value); }
@Override public @NonNull ScoreComponent append(final @NonNull Component component) { this.detectCycle(component); // detect cycle before modifying final List<Component> children = new ArrayList<>(this.children.size() + 1); children.addAll(this.children); children.add(component); return new ScoreComponent(children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, this.hoverEvent, this.insertion, this.name, this.objective, this.value); }
@Override public @NonNull ScoreComponent append(final @NonNull Component component) { this.detectCycle(component); // detect cycle before modifying final List<Component> children = new ArrayList<>(this.children.size() + 1); children.addAll(this.children); children.add(component); return new ScoreComponent(children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, this.hoverEvent, this.insertion, this.name, this.objective, this.value); }
@Override public @NonNull ScoreComponent hoverEvent(final @Nullable HoverEvent event) { if(event != null) this.detectCycle(event.value()); // detect cycle before modifying return new ScoreComponent(this.children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, event, this.insertion, this.name, this.objective, this.value); }
@Override public @NonNull ScoreComponent hoverEvent(final @Nullable HoverEvent event) { if(event != null) this.detectCycle(event.value()); // detect cycle before modifying return new ScoreComponent(this.children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, event, this.insertion, this.name, this.objective, this.value); }
@Override public @NonNull ScoreComponent hoverEvent(final @Nullable HoverEvent event) { if(event != null) this.detectCycle(event.value()); // detect cycle before modifying return new ScoreComponent(this.children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, event, this.insertion, this.name, this.objective, this.value); }