From b36dab6301c7a6d7f9ba011ddbd4feeb41482e5b Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sun, 20 Jul 2025 22:54:25 +0200 Subject: [PATCH] fix: formatting of plot-title in placeholder --- .../java/com/plotsquared/core/plot/PlotTitle.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotTitle.java b/Core/src/main/java/com/plotsquared/core/plot/PlotTitle.java index fe4302d0b..1285f2b6d 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotTitle.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotTitle.java @@ -63,4 +63,18 @@ public class PlotTitle { return subtitle; } + /** + * Provides a string representation of this plot title value (used in placeholders). + * + * @return the plot title representation in the format {@code "" "<subtitle>"} + * @since TODO + */ + @Override + public String toString() { + return "\"%s\" \"%s\"".formatted( + this.title != null ? this.title : "", + this.subtitle != null ? this.subtitle : "" + ); + } + }