Skip to content

Commit 1054018

Browse files
fix: formatting of plot-title in placeholder (#4702)
1 parent 0508a7f commit 1054018

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Core/src/main/java/com/plotsquared/core/plot/PlotTitle.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,18 @@ public String subtitle() {
6363
return subtitle;
6464
}
6565

66+
/**
67+
* Provides a string representation of this plot title value (used in placeholders).
68+
*
69+
* @return the plot title representation in the format {@code "<title>" "<subtitle>"}
70+
* @since TODO
71+
*/
72+
@Override
73+
public String toString() {
74+
return "\"%s\" \"%s\"".formatted(
75+
this.title != null ? this.title : "",
76+
this.subtitle != null ? this.subtitle : ""
77+
);
78+
}
79+
6680
}

0 commit comments

Comments
 (0)