From 5f76cc4f7b1913f741ff126a108664ee81ae5986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Tue, 21 Jul 2020 13:07:33 +0200 Subject: [PATCH] Give ConsolePlayer the same treatment --- .../java/com/plotsquared/core/player/ConsolePlayer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java b/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java index fef164669..187068e33 100644 --- a/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java +++ b/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java @@ -29,6 +29,7 @@ import com.google.inject.Inject; import com.plotsquared.core.PlotSquared; import com.plotsquared.core.command.RequiredType; import com.plotsquared.core.configuration.caption.Caption; +import com.plotsquared.core.configuration.caption.CaptionUtility; import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.database.DBFunc; import com.plotsquared.core.events.TeleportCause; @@ -140,10 +141,13 @@ public class ConsolePlayer extends PlotPlayer { @Override public void sendMessage(@Nonnull final Caption caption, @Nonnull final Template... replacements) { - final String message = caption.getComponent(this); + String message = caption.getComponent(this); if (message.isEmpty()) { return; } + message = CaptionUtility.format(this, message). + /* Magic replacement characters */ + replace('\u2010', '%').replace('\u2020', '&').replace('\u2030', '&'); // Create the template list, and add the prefix as a replacement final List