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 88acfcee6..d92bc2c3c 100644
--- a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java
+++ b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java
@@ -173,9 +173,21 @@ public class PlotListener {
String greeting = plot.getFlag(GreetingFlag.class);
if (!greeting.isEmpty()) {
if (!Settings.Chat.NOTIFICATION_AS_ACTIONBAR) {
- plot.format(StaticCaption.of(greeting), player, false).thenAcceptAsync(player::sendMessage);
+ player.sendMessage(
+ TranslatableCaption.of("flags.greeting_flag_format"),
+ Template.of("world", plot.getWorldName()),
+ Template.of("plot_id", plot.getId().toString()),
+ Template.of("alias", plot.getAlias()),
+ Template.of("greeting", greeting)
+ );
} else {
- plot.format(StaticCaption.of(greeting), player, false).thenAcceptAsync(player::sendActionBar);
+ player.sendActionBar(
+ TranslatableCaption.of("flags.greeting_flag_format"),
+ Template.of("world", plot.getWorldName()),
+ Template.of("plot_id", plot.getId().toString()),
+ Template.of("alias", plot.getAlias()),
+ Template.of("greeting", greeting)
+ );
}
}
@@ -405,9 +417,21 @@ public class PlotListener {
String farewell = plot.getFlag(FarewellFlag.class);
if (!farewell.isEmpty()) {
if (!Settings.Chat.NOTIFICATION_AS_ACTIONBAR) {
- plot.format(StaticCaption.of(farewell), player, false).thenAcceptAsync(player::sendMessage);
+ player.sendMessage(
+ TranslatableCaption.of("flags.farewell_flag_format"),
+ Template.of("world", plot.getWorldName()),
+ Template.of("plot_id", plot.getId().toString()),
+ Template.of("alias", plot.getAlias()),
+ Template.of("farewell", farewell)
+ );
} else {
- plot.format(StaticCaption.of(farewell), player, false).thenAcceptAsync(player::sendActionBar);
+ player.sendActionBar(
+ TranslatableCaption.of("flags.farewell_flag_format"),
+ Template.of("world", plot.getWorldName()),
+ Template.of("plot_id", plot.getId().toString()),
+ Template.of("alias", plot.getAlias()),
+ Template.of("farewell", farewell)
+ );
}
}
diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json
index ded6005a4..9f3864dc3 100644
--- a/Core/src/main/resources/lang/messages_en.json
+++ b/Core/src/main/resources/lang/messages_en.json
@@ -615,6 +615,8 @@
"flags.flag_error_title": "Flag value must be in the format \"A title\" \"The subtitle\".",
"flags.area_flags": "Area flags: ",
"flags.road_flags": "Road flags: ",
+ "flags.greeting_flag_format": "[;]: ",
+ "flags.farewell_flag_format": "[;]: ",
"commands.description.add": "Allow a user to build in a plot while the plot owner is online.",
"commands.description.alias": "Set the plot alias.",
"commands.description.area": "Create a new plot area.",