Skip to content

Commit 9abfa21

Browse files
authored
Add 'world' placeholder to status messages (#4632)
Signed-off-by: Alexander Brandes <[email protected]>
1 parent b84599b commit 9abfa21

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

Core/src/main/java/com/plotsquared/core/command/Buy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public CompletableFuture<Boolean> execute(
144144
plot.getPlotModificationManager().setSign(player.getName());
145145
player.sendMessage(
146146
TranslatableCaption.of("working.claimed"),
147+
TagResolver.resolver("world", Tag.inserting(Component.text(plot.getArea().getWorldName()))),
147148
TagResolver.resolver("plot", Tag.inserting(Component.text(plot.getId().toString())))
148149
);
149150
this.eventDispatcher.callPostPlayerBuyPlot(player, previousOwner, plot, price);

Core/src/main/java/com/plotsquared/core/command/Clear.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public CompletableFuture<Boolean> execute(
131131
player.sendMessage(
132132
TranslatableCaption.of("working.clearing_done"),
133133
TagResolver.builder()
134+
.tag("world", Tag.inserting(Component.text(plot.getArea().getWorldName())))
134135
.tag("amount", Tag.inserting(Component.text(System.currentTimeMillis() - start)))
135136
.tag("plot", Tag.inserting(Component.text(plot.getId().toString())))
136137
.build()

Core/src/main/java/com/plotsquared/core/command/Delete.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public boolean onCommand(final PlotPlayer<?> player, String[] args) {
124124
"amount",
125125
Tag.inserting(Component.text(String.valueOf(System.currentTimeMillis() - start)))
126126
),
127+
TagResolver.resolver("world", Tag.inserting(Component.text(plotArea.getWorldName()))),
127128
TagResolver.resolver("plot", Tag.inserting(Component.text(plot.getId().toString())))
128129
);
129130
eventDispatcher.callPostDelete(plot);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,7 @@ public boolean claim(
17171717
}
17181718
player.sendMessage(
17191719
TranslatableCaption.of("working.claimed"),
1720+
TagResolver.resolver("world", Tag.inserting(Component.text(this.getWorldName()))),
17201721
TagResolver.resolver("plot", Tag.inserting(Component.text(this.getId().toString())))
17211722
);
17221723
if (teleport) {

Core/src/main/resources/lang/messages_en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,11 @@
390390
"info.area_list_tooltip": "<gold>Claimed=</gold><gray><claimed></gray>\n<gold>Usage=</gold><gray><usage></gray>\n<gold>Clusters=</gold><gray><clusters></gray>\n<gold>Region=</gold><gray><region></gray>\n<gold>Generator=</gold><gray><generator></gray>",
391391
"info.area_list_item": "<click:run_command:'<command_tp>'><hover:show_text:'<command_tp>'><dark_gray>[</dark_gray><gold><number></gold><dark_gray>]</dark_gray></hover></click> <click:run_command:'<command_info>'><hover:show_text:'<hover_info>'><gold><area_name></gold></hover></click><gray> - </gray><gray><area_type>:<area_terrain></gray>",
392392
"working.generating_component": "<prefix><gold>Started generating component from your settings.</gold>",
393-
"working.clearing_done": "<prefix><dark_aqua>Plot </dark_aqua><gold><plot></gold><dark_aqua> has been cleared! Took </dark_aqua><gold><amount>ms</gold><dark_aqua>.</dark_aqua>",
394-
"working.deleting_done": "<prefix><dark_aqua>Plot </dark_aqua><gold><plot></gold><dark_aqua> has been deleted! Took </dark_aqua><gold><amount>ms</gold><dark_aqua>.</dark_aqua>",
393+
"working.clearing_done": "<prefix><dark_aqua>Plot </dark_aqua><gold><world>;<plot></gold><dark_aqua> has been cleared! Took </dark_aqua><gold><amount>ms</gold><dark_aqua>.</dark_aqua>",
394+
"working.deleting_done": "<prefix><dark_aqua>Plot </dark_aqua><gold><world>;<plot></gold><dark_aqua> has been deleted! Took </dark_aqua><gold><amount>ms</gold><dark_aqua>.</dark_aqua>",
395395
"working.plot_not_claimed": "<prefix><gray>Plot not claimed.</gray>",
396396
"working.plot_is_claimed": "<prefix><gray>This plot is already claimed.</gray>",
397-
"working.claimed": "<prefix><dark_aqua>You successfully claimed the plot </dark_aqua><gold><plot></gold><dark_aqua>.</dark_aqua>",
397+
"working.claimed": "<prefix><dark_aqua>You successfully claimed the plot </dark_aqua><gold><world>;<plot></gold><dark_aqua>.</dark_aqua>",
398398
"working.progress": "<prefix><gray>Current progress: </gray><gold><progress></gold><gray>%</gray>",
399399
"working.component_complete": "<prefix><gold>Component generation has finished for plot <plot>.</gold>",
400400
"list.comment_list_header_paged": "<gray>(Page </gray><gold><cur></gold><gray>/</gray><gold><max></gold><gray>) </gray><gold>List of <amount> comment(s):</gold>",

0 commit comments

Comments
 (0)