mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
Fix invalid backup messages & component prefix & update minimessage
This commit is contained in:
parent
b3aec8f839
commit
491a171409
@ -142,14 +142,14 @@ public final class Backup extends Command {
|
||||
} else if (!plot.hasOwner()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_unowned")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_unowned").getComponent(player))
|
||||
);
|
||||
} else if (plot.getVolume() > Integer.MAX_VALUE) {
|
||||
player.sendMessage(TranslatableCaption.of("schematics.schematic_too_large"));
|
||||
} else if (plot.isMerged()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_merged")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_merged").getComponent(player))
|
||||
);
|
||||
} else if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_BACKUP_OTHER)) {
|
||||
@ -162,7 +162,7 @@ public final class Backup extends Command {
|
||||
if (backupProfile instanceof NullBackupProfile) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_other")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_other").getComponent(player))
|
||||
);
|
||||
} else {
|
||||
backupProfile.createBackup().whenComplete((backup, throwable) -> {
|
||||
@ -196,12 +196,12 @@ public final class Backup extends Command {
|
||||
} else if (!plot.hasOwner()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_unowned")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_unowned").getComponent(player))
|
||||
);
|
||||
} else if (plot.isMerged()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_merged")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_merged").getComponent(player))
|
||||
);
|
||||
} else if (plot.getVolume() > Integer.MAX_VALUE) {
|
||||
player.sendMessage(TranslatableCaption.of("schematics.schematic_too_large"));
|
||||
@ -216,7 +216,7 @@ public final class Backup extends Command {
|
||||
if (backupProfile instanceof NullBackupProfile) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_other")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_other").getComponent(player))
|
||||
);
|
||||
} else {
|
||||
backupProfile.listBackups().whenComplete((backups, throwable) -> {
|
||||
@ -267,12 +267,12 @@ public final class Backup extends Command {
|
||||
} else if (!plot.hasOwner()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_unowned")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_unowned").getComponent(player))
|
||||
);
|
||||
} else if (plot.isMerged()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_merged")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_merged").getComponent(player))
|
||||
);
|
||||
} else if (plot.getVolume() > Integer.MAX_VALUE) {
|
||||
player.sendMessage(TranslatableCaption.of("schematics.schematic_too_large"));
|
||||
@ -302,7 +302,7 @@ public final class Backup extends Command {
|
||||
if (backupProfile instanceof NullBackupProfile) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_other")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_other").getComponent(player))
|
||||
);
|
||||
} else {
|
||||
backupProfile.listBackups().whenComplete((backups, throwable) -> {
|
||||
@ -316,7 +316,8 @@ public final class Backup extends Command {
|
||||
if (number < 1 || number > backups.size()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_invalid_choice")
|
||||
Template.of("plot",
|
||||
TranslatableCaption.of("generic.generic_invalid_choice").getComponent(player))
|
||||
);
|
||||
} else {
|
||||
final com.plotsquared.core.backup.Backup backup =
|
||||
@ -325,7 +326,7 @@ public final class Backup extends Command {
|
||||
.exists(backup.getFile())) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("backups.backup_impossible"),
|
||||
Template.of("plot", "generic.generic_invalid_choice")
|
||||
Template.of("plot", TranslatableCaption.of("generic.generic_invalid_choice").getComponent(player))
|
||||
);
|
||||
} else {
|
||||
CmdConfirm.addPending(player, "/plot backup load " + number,
|
||||
|
@ -249,7 +249,8 @@ public class ComponentPresetManager {
|
||||
}
|
||||
lore.add(MINI_MESSAGE.serialize(MINI_MESSAGE.parse(
|
||||
TranslatableCaption.of("preset.preset_lore_component").getComponent(player),
|
||||
Template.of("component", preset.getComponent().name().toLowerCase())
|
||||
Template.of("component", preset.getComponent().name().toLowerCase()),
|
||||
Template.of("prefix", TranslatableCaption.of("core.prefix").getComponent(player))
|
||||
)));
|
||||
lore.removeIf(String::isEmpty);
|
||||
if (!lore.isEmpty()) {
|
||||
|
@ -126,7 +126,7 @@
|
||||
"setup.setup_wrong_generator": "<prefix><red>The specified generator does not identify as BukkitPlotGenerator</red><dark_gray> - </dark_gray><dark_green>You may need to manually configure the other plugin.</dark_green>",
|
||||
"setup.setup_world_name_format": "<prefix><red>Non [a-z0-9_.-] character in the world name:</red><gold> ",
|
||||
"setup.setup_world_apply_plotsquared": "<prefix><red>The world you specified already exists. After restarting, new terrain will use </red><gold>PlotSquared</gold><red>, however you may need to reset the world for it to generate correctly!</red>",
|
||||
"setup.setup_partial_area": "<prefix><gold>What terrain would you like in plots?</gold>\n<dark_gray> - </dark_gray><dark_green>NONE</dark_green><dark_gray> - </dark_gray><gray>No terrain at all</gray>\n<dark_gray> - </dark_gray><dark_green>ORE</dark_green><dark_gray> - </dark_gray><gray>Just some ore veins and trees</gray>\n<dark_gray> - </dark_gray><dark_green>ROAD</dark_green><dark_gray> - </dark_green><gray>Terrain separated by roads</gray>\n<dark_gray> - </dark_gray><dark_green>ALL</dark_green><dark_gray> - </dark_gray><gray>Entirely vanilla generation</gray>",
|
||||
"setup.setup_partial_area": "<prefix><gold>What terrain would you like in plots?</gold>\n<dark_gray> - </dark_gray><dark_green>NONE</dark_green><dark_gray> - </dark_gray><gray>No terrain at all</gray>\n<dark_gray> - </dark_gray><dark_green>ORE</dark_green><dark_gray> - </dark_gray><gray>Just some ore veins and trees</gray>\n<dark_gray> - </dark_gray><dark_green>ROAD</dark_green><dark_gray> - </dark_gray><gray>Terrain separated by roads</gray>\n<dark_gray> - </dark_gray><dark_green>ALL</dark_green><dark_gray> - </dark_gray><gray>Entirely vanilla generation</gray>",
|
||||
"setup.setup_partial_area_error": "<prefix><red>You must choose the terrain!</red>",
|
||||
"setup.setup_area_name": "<prefix><gold>What would you like this area called?</gold>",
|
||||
"setup.setup_area_non_alphanumerical": "<prefix><red>The area ID must be alphanumerical!</red>",
|
||||
@ -429,10 +429,10 @@
|
||||
"preset.preset_invalid": "<prefix><red>Could not generate a pattern from that preset.</red>",
|
||||
"preset.preset_lore_cost": "<prefix><gray>Cost: </gray><gold><cost></gold>",
|
||||
"preset.preset_lore_component": "<prefix><gray>Component: </gray><gold><component></gold>",
|
||||
"generic.generic_other": "<prefix><gray>other</gray>",
|
||||
"generic.generic_merged": "<prefix><gray>merged</gray>",
|
||||
"generic.generic_unowned": "<prefix><gray>unowned</gray>",
|
||||
"generic.generic_invalid_choice": "<prefix><gray>invalid choice</gray>",
|
||||
"generic.generic_other": "<gray>other</gray>",
|
||||
"generic.generic_merged": "<gray>merged</gray>",
|
||||
"generic.generic_unowned": "<gray>unowned</gray>",
|
||||
"generic.generic_invalid_choice": "<gray>invalid choice</gray>",
|
||||
"single.single_area_missing_selection": "<prefix><red>Error! You need to select a square region.</red>",
|
||||
"single.single_area_not_square": "<prefix><red>Error! Your selection needs to be a square.</red>",
|
||||
"single.single_area_overlapping": "<prefix><red>Error! Your selection overlaps with an existing plot area.</red>",
|
||||
|
@ -7,7 +7,7 @@ gson = "2.8.0"
|
||||
snakeyaml = "1.27"
|
||||
|
||||
adventure-api = "4.7.0"
|
||||
adventure-text-minimessage = "4.0.0-SNAPSHOT"
|
||||
adventure-text-minimessage = "4.1.0-SNAPSHOT"
|
||||
adventure-platform-bukkit = "4.0.0-SNAPSHOT"
|
||||
|
||||
guice = "5.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user