diff --git a/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java b/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java index 2aa6a140b..e89ef5bad 100644 --- a/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java +++ b/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java @@ -37,6 +37,7 @@ import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory; import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.plot.Plot; import com.plotsquared.core.util.task.TaskManager; +import net.kyori.adventure.text.minimessage.Template; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -95,7 +96,7 @@ import java.util.concurrent.TimeUnit; whenDone.run(); } else { if (player != null) { - player.sendMessage(TranslatableCaption.of("backups.backup_automatic_started")); + player.sendMessage(TranslatableCaption.of("backups.backup_automatic_started"), Template.of("plot", String.valueOf(plot.getId()))); } profile.createBackup().whenComplete((backup, throwable) -> { if (throwable != null) { diff --git a/Core/src/main/java/com/plotsquared/core/command/Buy.java b/Core/src/main/java/com/plotsquared/core/command/Buy.java index 400b7db98..ff7c0080e 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Buy.java +++ b/Core/src/main/java/com/plotsquared/core/command/Buy.java @@ -120,7 +120,7 @@ public class Buy extends Command { plot.removeFlag(event.getFlag()); } plot.setOwner(player.getUUID()); - player.sendMessage(TranslatableCaption.of("working.claimed")); + player.sendMessage(TranslatableCaption.of("working.claimed"), Template.of("plot", String.valueOf(plot.getId()))); whenDone.run(Buy.this, CommandResult.SUCCESS); }, () -> { this.econHandler.depositMoney(player, price); diff --git a/Core/src/main/java/com/plotsquared/core/command/Clear.java b/Core/src/main/java/com/plotsquared/core/command/Clear.java index 4eae46a2a..155f9e26f 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Clear.java +++ b/Core/src/main/java/com/plotsquared/core/command/Clear.java @@ -125,7 +125,8 @@ public class Clear extends Command { } player.sendMessage( TranslatableCaption.of("working.clearing_done"), - Template.of("amount", String.valueOf(System.currentTimeMillis() - start)) + Template.of("amount", String.valueOf(System.currentTimeMillis() - start)), + Template.of("plot", String.valueOf(plot.getId())) ); }); }); diff --git a/Core/src/main/java/com/plotsquared/core/command/Delete.java b/Core/src/main/java/com/plotsquared/core/command/Delete.java index 432ef7947..8632be51a 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Delete.java +++ b/Core/src/main/java/com/plotsquared/core/command/Delete.java @@ -121,7 +121,8 @@ public class Delete extends SubCommand { } player.sendMessage( TranslatableCaption.of("working.deleting_done"), - Template.of("amount", String.valueOf(System.currentTimeMillis() - start)) + Template.of("amount", String.valueOf(System.currentTimeMillis() - start)), + Template.of("plot", String.valueOf(plot.getId())) ); }); if (result) { diff --git a/Core/src/main/java/com/plotsquared/core/command/Done.java b/Core/src/main/java/com/plotsquared/core/command/Done.java index 35a8432a9..a82caf1c8 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Done.java +++ b/Core/src/main/java/com/plotsquared/core/command/Done.java @@ -92,7 +92,7 @@ public class Done extends SubCommand { return false; } plot.addRunning(); - player.sendMessage(TranslatableCaption.of("web.generating_link")); + player.sendMessage(TranslatableCaption.of("web.generating_link"), Template.of("plot", String.valueOf(plot.getId()))); final Settings.Auto_Clear doneRequirements = Settings.AUTO_CLEAR.get("done"); if (ExpireManager.IMP == null || doneRequirements == null) { finish(plot, player, true); diff --git a/Core/src/main/java/com/plotsquared/core/command/Download.java b/Core/src/main/java/com/plotsquared/core/command/Download.java index 52d7ddf83..8b3942951 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Download.java +++ b/Core/src/main/java/com/plotsquared/core/command/Download.java @@ -127,7 +127,7 @@ public class Download extends SubCommand { @Override public void run(URL url) { plot.removeRunning(); if (url == null) { - player.sendMessage(TranslatableCaption.of("web.generating_link_failed")); + player.sendMessage(TranslatableCaption.of("web.generating_link_failed"), Template.of("plot", String.valueOf(plot.getId()))); return; } player.sendMessage(TranslatableCaption.of("web.generation_link_success"), Template.of("url", url.toString())); @@ -137,7 +137,7 @@ public class Download extends SubCommand { sendUsage(player); return false; } - player.sendMessage(TranslatableCaption.of("web.generating_link")); + player.sendMessage(TranslatableCaption.of("web.generating_link"), Template.of("plot", String.valueOf(plot.getId()))); return true; } @@ -184,7 +184,7 @@ public class Download extends SubCommand { this.plotUploader.upload(plot) .whenComplete((result, throwable) -> { if (throwable != null || !result.isSuccess()) { - player.sendMessage(TranslatableCaption.of("web.generating_link_failed")); + player.sendMessage(TranslatableCaption.of("web.generating_link_failed"), Template.of("plot", String.valueOf(plot.getId()))); } else { player.sendMessage( TranslatableCaption.of("web.generation_link_success"), diff --git a/Core/src/main/java/com/plotsquared/core/command/Set.java b/Core/src/main/java/com/plotsquared/core/command/Set.java index 3ce8383bc..7b048d796 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Set.java +++ b/Core/src/main/java/com/plotsquared/core/command/Set.java @@ -161,7 +161,7 @@ public class Set extends SubCommand { } queue.setCompleteTask(() -> { plot.removeRunning(); - player.sendMessage(TranslatableCaption.of("working.component_complete")); + player.sendMessage(TranslatableCaption.of("working.component_complete"), Template.of("plot", String.valueOf(plot.getId()))); }); if (Settings.QUEUE.NOTIFY_PROGRESS) { queue.addProgressSubscriber( diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index 46a0caed9..a279485a0 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -23,9 +23,9 @@ "area.set_pos2": "You will now set pos2: . Note: The chosen plot size may result in the created area not exactly matching your second position.", - "web.generating_link": "Processing plot...", + "web.generating_link": "Processing plot ...", "web.plot_merged": "This plot is merged and therefore cannot be downloaded", - "web.generating_link_failed": "Failed to generate download link!", + "web.generating_link_failed": "Failed to generate download link for plot !", "web.generation_link_success": "Download: > \n Deletion: >\nAttention: Opening the deletion link will delete the file immediately.", "web.save_failed": "Failed to save.", "web.load_null": "Please use to get a list of schematics.", @@ -416,13 +416,13 @@ "info.area_list_item": ">\">[] >\"> - :", "working.generating_component": "Started generating component from your settings.", - "working.clearing_done": "Clear completed! Took ms.", - "working.deleting_done": "Delete completed! Took ms.", + "working.clearing_done": "Plot has been cleared! Took ms.", + "working.deleting_done": "Plot has been deleted! Took ms.", "working.plot_not_claimed": "Plot not claimed.", "working.plot_is_claimed": "This plot is already claimed.", - "working.claimed": "You successfully claimed the plot.", + "working.claimed": "You successfully claimed the plot .", "working.progress": "Current progress: %", - "working.component_complete": "Component generation has finished.", + "working.component_complete": "Component generation has finished for plot .", "list.comment_list_header_paged": "(Page /) List of comments", "list.comment_list_comment": "[#[;][]\n", @@ -499,7 +499,7 @@ "backups.backup_list_header": "Available backups for plot ", "backups.backup_list_entry": "- # ", "backups.backup_list_failed": "Backup listing failed: ", - "backups.backup_automatic_started": "Backing up the plot...", + "backups.backup_automatic_started": "Backing up the plot ...", "backups.backup_automatic_finished": "The automatic backup process finished successfully!", "backups.backup_automatic_failure": "The automatic backup process failed. Your pending action has been canceled. Reason: ",