N0tMyFaultOG 2021-01-08 16:46:57 +01:00
parent 25a8f1522a
commit 495952acb0
No known key found for this signature in database
GPG Key ID: 823348042DA95A81
8 changed files with 19 additions and 16 deletions

View File

@ -37,6 +37,7 @@ import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.util.task.TaskManager; import com.plotsquared.core.util.task.TaskManager;
import net.kyori.adventure.text.minimessage.Template;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -95,7 +96,7 @@ import java.util.concurrent.TimeUnit;
whenDone.run(); whenDone.run();
} else { } else {
if (player != null) { 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) -> { profile.createBackup().whenComplete((backup, throwable) -> {
if (throwable != null) { if (throwable != null) {

View File

@ -120,7 +120,7 @@ public class Buy extends Command {
plot.removeFlag(event.getFlag()); plot.removeFlag(event.getFlag());
} }
plot.setOwner(player.getUUID()); 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); whenDone.run(Buy.this, CommandResult.SUCCESS);
}, () -> { }, () -> {
this.econHandler.depositMoney(player, price); this.econHandler.depositMoney(player, price);

View File

@ -125,7 +125,8 @@ public class Clear extends Command {
} }
player.sendMessage( player.sendMessage(
TranslatableCaption.of("working.clearing_done"), 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()))
); );
}); });
}); });

View File

@ -121,7 +121,8 @@ public class Delete extends SubCommand {
} }
player.sendMessage( player.sendMessage(
TranslatableCaption.of("working.deleting_done"), 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) { if (result) {

View File

@ -92,7 +92,7 @@ public class Done extends SubCommand {
return false; return false;
} }
plot.addRunning(); 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"); final Settings.Auto_Clear doneRequirements = Settings.AUTO_CLEAR.get("done");
if (ExpireManager.IMP == null || doneRequirements == null) { if (ExpireManager.IMP == null || doneRequirements == null) {
finish(plot, player, true); finish(plot, player, true);

View File

@ -127,7 +127,7 @@ public class Download extends SubCommand {
@Override public void run(URL url) { @Override public void run(URL url) {
plot.removeRunning(); plot.removeRunning();
if (url == null) { 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; return;
} }
player.sendMessage(TranslatableCaption.of("web.generation_link_success"), Template.of("url", url.toString())); player.sendMessage(TranslatableCaption.of("web.generation_link_success"), Template.of("url", url.toString()));
@ -137,7 +137,7 @@ public class Download extends SubCommand {
sendUsage(player); sendUsage(player);
return false; 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; return true;
} }
@ -184,7 +184,7 @@ public class Download extends SubCommand {
this.plotUploader.upload(plot) this.plotUploader.upload(plot)
.whenComplete((result, throwable) -> { .whenComplete((result, throwable) -> {
if (throwable != null || !result.isSuccess()) { 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 { } else {
player.sendMessage( player.sendMessage(
TranslatableCaption.of("web.generation_link_success"), TranslatableCaption.of("web.generation_link_success"),

View File

@ -161,7 +161,7 @@ public class Set extends SubCommand {
} }
queue.setCompleteTask(() -> { queue.setCompleteTask(() -> {
plot.removeRunning(); 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) { if (Settings.QUEUE.NOTIFY_PROGRESS) {
queue.addProgressSubscriber( queue.addProgressSubscriber(

View File

@ -23,9 +23,9 @@
"area.set_pos2": "You will now set pos2: <command>. Note: The chosen plot size may result in the created area not exactly matching your second position.", "area.set_pos2": "You will now set pos2: <command>. Note: The chosen plot size may result in the created area not exactly matching your second position.",
"web.generating_link": "<prefix><gold>Processing plot...</gold>", "web.generating_link": "<prefix><gold>Processing plot <plot>...</gold>",
"web.plot_merged": "<prefix><red>This plot is merged and therefore cannot be downloaded</red>", "web.plot_merged": "<prefix><red>This plot is merged and therefore cannot be downloaded</red>",
"web.generating_link_failed": "<prefix><red>Failed to generate download link!</red>", "web.generating_link_failed": "<prefix><red>Failed to generate download link for plot <plot>!</red>",
"web.generation_link_success": "<prefix><gold>Download: <gray><click:open_url:<download>><download></click></gray> \n Deletion: <gray><click:open_url:<delete>><delete></click></gray>\n<red>Attention: Opening the deletion link will delete the file immediately.</red></gold>", "web.generation_link_success": "<prefix><gold>Download: <gray><click:open_url:<download>><download></click></gray> \n Deletion: <gray><click:open_url:<delete>><delete></click></gray>\n<red>Attention: Opening the deletion link will delete the file immediately.</red></gold>",
"web.save_failed": "<prefix><red>Failed to save.</red>", "web.save_failed": "<prefix><red>Failed to save.</red>",
"web.load_null": "<prefix><gray>Please use </gray><dark_aqua><command> </dark_aqua><gray>to get a list of schematics.</gray>", "web.load_null": "<prefix><gray>Please use </gray><dark_aqua><command> </dark_aqua><gray>to get a list of schematics.</gray>",
@ -416,13 +416,13 @@
"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>", "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>",
"working.generating_component": "<prefix><gold>Started generating component from your settings.</gold>", "working.generating_component": "<prefix><gold>Started generating component from your settings.</gold>",
"working.clearing_done": "<prefix><dark_aqua>Clear completed! Took <amount>ms.</dark_aqua>", "working.clearing_done": "<prefix><dark_aqua>Plot <plot> has been cleared! Took <amount>ms.</dark_aqua>",
"working.deleting_done": "<prefix><dark_aqua>Delete completed! Took <amount>ms.</dark_aqua>", "working.deleting_done": "<prefix><dark_aqua>Plot <plot> has been deleted! Took <amount>ms.</dark_aqua>",
"working.plot_not_claimed": "<prefix><gray>Plot not claimed.</gray>", "working.plot_not_claimed": "<prefix><gray>Plot not claimed.</gray>",
"working.plot_is_claimed": "<prefix><gray>This plot is already claimed.</gray>", "working.plot_is_claimed": "<prefix><gray>This plot is already claimed.</gray>",
"working.claimed": "<prefix><dark_aqua>You successfully claimed the plot.</dark_aqua>", "working.claimed": "<prefix><dark_aqua>You successfully claimed the plot <plot>.</dark_aqua>",
"working.progress": "<prefix><gray>Current progress: </gray><gold><progress></gold><gray>%</gray>", "working.progress": "<prefix><gray>Current progress: </gray><gold><progress></gold><gray>%</gray>",
"working.component_complete": "<prefix><gold>Component generation has finished.</gold>", "working.component_complete": "<prefix><gold>Component generation has finished for plot <plot>.</gold>",
"list.comment_list_header_paged": "<gray>(Page </gray><gold><cur></gold><gray>/</gray><gold><max></gold><gray>) </gray><gold>List of <amount> comments</gold>", "list.comment_list_header_paged": "<gray>(Page </gray><gold><cur></gold><gray>/</gray><gold><max></gold><gray>) </gray><gold>List of <amount> comments</gold>",
"list.comment_list_comment": "<dark_gray>[</dark_gray><gray>#<number></gray><dark_gray>[</dark_gray><gray><world>;<plot_id></gray><dark_gray>][</dark_gray><gold><commenter></gold><dark_gray>]</dark_gray><comment>\n", "list.comment_list_comment": "<dark_gray>[</dark_gray><gray>#<number></gray><dark_gray>[</dark_gray><gray><world>;<plot_id></gray><dark_gray>][</dark_gray><gold><commenter></gold><dark_gray>]</dark_gray><comment>\n",
@ -499,7 +499,7 @@
"backups.backup_list_header": "<prefix><gold>Available backups for plot <gray><plot></gray></gold>", "backups.backup_list_header": "<prefix><gold>Available backups for plot <gray><plot></gray></gold>",
"backups.backup_list_entry": "<prefix><dark_gray>- </dark_gray><gold>#<number> </gold><gray><value></gray>", "backups.backup_list_entry": "<prefix><dark_gray>- </dark_gray><gold>#<number> </gold><gray><value></gray>",
"backups.backup_list_failed": "<prefix><red>Backup listing failed: </red><gray><reason></gray>", "backups.backup_list_failed": "<prefix><red>Backup listing failed: </red><gray><reason></gray>",
"backups.backup_automatic_started": "<prefix><gold>Backing up the plot...</gold>", "backups.backup_automatic_started": "<prefix><gold>Backing up the plot <plot>...</gold>",
"backups.backup_automatic_finished": "<prefix><gold>The automatic backup process finished successfully!</gold>", "backups.backup_automatic_finished": "<prefix><gold>The automatic backup process finished successfully!</gold>",
"backups.backup_automatic_failure": "<prefix><red>The automatic backup process failed. Your pending action has been canceled. Reason: </red><gray><reason></gray>", "backups.backup_automatic_failure": "<prefix><red>The automatic backup process failed. Your pending action has been canceled. Reason: </red><gray><reason></gray>",