From 7ee46be2acfaeb1fb1807b80a88c5daf8efd964c Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 7 Oct 2021 10:07:13 +0200 Subject: [PATCH] feat: Allow plot alias in title (#3273) Fixes #3171 --- .../java/com/plotsquared/core/listener/PlotListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java index c635abb44..88acfcee6 100644 --- a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java @@ -322,12 +322,13 @@ public class PlotListener { Template plotTemplate = Template.of("plot", lastPlot.getId().toString()); Template worldTemplate = Template.of("world", player.getLocation().getWorldName()); Template ownerTemplate = Template.of("owner", owner); + Template aliasTemplate = Template.of("alias", plot.getAlias()); final Consumer userConsumer = user -> { if (Settings.Titles.TITLES_AS_ACTIONBAR) { - player.sendActionBar(header, plotTemplate, worldTemplate, ownerTemplate); + player.sendActionBar(header, aliasTemplate, plotTemplate, worldTemplate, ownerTemplate); } else { - player.sendTitle(header, subHeader, plotTemplate, worldTemplate, ownerTemplate); + player.sendTitle(header, subHeader, aliasTemplate, plotTemplate, worldTemplate, ownerTemplate); } };