From 1054018e1e9b740d28d1b82a8de60673b8b6d100 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Thu, 24 Jul 2025 20:50:23 +0200 Subject: [PATCH] fix: formatting of plot-title in placeholder (#4702) --- .../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 : "" + ); + } + }