diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java index 26962781c..2c901aa35 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java @@ -25,8 +25,7 @@ import com.github.intellectualsites.plotsquared.plot.util.MainUtil; return sendMessage(player, Captions.NOT_IN_PLOT_WORLD); } HybridUtils.manager.setupRoadSchematic(plot); - MainUtil.sendMessage(player, - "$1Saved new road schematic. To test the road, fly to a few other plots and use /plot debugroadregen"); + MainUtil.sendMessage(player, Captions.SCHEMATIC_ROAD_CREATED); return true; } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java index 14521b2c6..776cff0f8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java @@ -76,7 +76,7 @@ import java.net.URL; Captions.NO_PERMISSION.send(player, Captions.PERMISSION_DOWNLOAD_WORLD); return false; } - MainUtil.sendMessage(player, "&cNote: The `.mca` files are 512x512"); + MainUtil.sendMessage(player, Captions.MCA_FILE_SIZE); plot.addRunning(); WorldUtil.IMP.saveWorld(world); WorldUtil.IMP.upload(plot, null, null, new RunnableVal() { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java index 24ccbe016..f654fa776 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java @@ -62,7 +62,7 @@ public class SchematicCmd extends SubCommand { return false; } if (this.running) { - MainUtil.sendMessage(player, "&cTask is already running."); + MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS); return false; } final String location = args[1]; @@ -148,8 +148,7 @@ public class SchematicCmd extends SubCommand { return false; } if (args.length != 2) { - MainUtil.sendMessage(player, - "&cNeed world argument. Use &7/plot sch exportall "); + MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_WORLD_ARGS); return false; } PlotArea area = PlotSquared.get().getPlotAreaByString(args[1]); @@ -160,19 +159,17 @@ public class SchematicCmd extends SubCommand { Collection plots = area.getPlots(); if (plots.isEmpty()) { MainUtil - .sendMessage(player, "&cInvalid world. Use &7/plot sch exportall "); + .sendMessage(player, Captions.SCHEMATIC_EXPORTALL_WORLD); return false; } boolean result = SchematicHandler.manager.exportAll(plots, null, null, - () -> MainUtil.sendMessage(player, "&aFinished mass export")); + () -> MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_FINISHED)); if (!result) { - MainUtil.sendMessage(player, "&cTask is already running."); + MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS); return false; } else { - MainUtil.sendMessage(player, - "&3Plot&8->&3Schematic&8: &7Mass export has started. This may take a while."); - MainUtil.sendMessage(player, - "&3Plot&8->&3Schematic&8: &7Found &c" + plots.size() + "&7 plots..."); + MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_STARTED); + MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_COUNT, plots.size()); } break; } @@ -184,7 +181,7 @@ public class SchematicCmd extends SubCommand { return false; } if (this.running) { - MainUtil.sendMessage(player, "&cTask is already running."); + MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS); return false; } Location location = player.getLocation(); @@ -203,14 +200,14 @@ public class SchematicCmd extends SubCommand { } ArrayList plots = Lists.newArrayList(plot); boolean result = SchematicHandler.manager.exportAll(plots, null, null, () -> { - MainUtil.sendMessage(player, "&aFinished export"); + MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_SINGLE_FINISHED); SchematicCmd.this.running = false; }); if (!result) { - MainUtil.sendMessage(player, "&cTask is already running."); + MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS); return false; } else { - MainUtil.sendMessage(player, "&7Starting export..."); + MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_STARTED); } break; case "list": { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java index 9ce6bd5fb..7e84ef3aa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java @@ -41,7 +41,7 @@ public class Unlink extends SubCommand { } Runnable runnable = () -> { if (!plot.unlinkPlot(createRoad, createRoad)) { - MainUtil.sendMessage(player, "&cUnlink has been cancelled"); + MainUtil.sendMessage(player, Captions.UNMERGE_CANCELLED); return; } MainUtil.sendMessage(player, Captions.UNLINK_SUCCESS); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java index a20898f5a..dca4f5b23 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java @@ -400,6 +400,15 @@ public enum Captions { "Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"), SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics"), + SCHEMATIC_ROAD_CREATED("$1Saved new road schematic. To test the schematic, fly to a few other plots and run /plot debugroadregen", "Schematics"), + MCA_FILE_SIZE("$1Note: The `.mca` files are 512x512", "Schematics"), + SCHEMATIC_EXPORTALL_STARTED("$1Starting export...", "Schematics"), + SCHEMATIC_EXPORTALL_WORLD_ARGS("$1Need world argument. Use $3/plot sch exportall ", "Schematics"), + SCHEMATIC_EXPORTALL_WORLD("$1Invalid world. Use &3/plot sch exportall ", "Schematic"), + SCHEMATIC_EXPORTALL_MASS_STARTED("$1Schematic mass export has been started. This may take a while", "Schematics"), + SCHEMATIC_EXPORTALL_COUNT("$1Found $3%s $1plots...", "Schematics"), + SCHEMATIC_EXPORTALL_FINISHED("$1Finished mass export", "Schematics"), + SCHEMATIC_EXPORTALL_SINGLE_FINISHED("$1Finished export", "Schematics"), // // TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"), @@ -470,8 +479,9 @@ public enum Captions { NO_AVAILABLE_AUTOMERGE( "$2You do not own any adjacent plots in the specified direction or are not allowed to merge to the required size.", - "Merge"), UNLINK_REQUIRED("$2An unlink is required to do this.", "Merge"), - + "Merge"), + UNLINK_REQUIRED("$2An unlink is required to do this.", "Merge"), + UNMERGE_CANCELLED("$1Unlink has been cancelled", "Merge"), UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS( "$2Successfully unlinked plots.", "Merge"), // @@ -505,6 +515,7 @@ public enum Captions { WAIT_FOR_TIMER( "$2A set block timer is bound to either the current plot or you. Please wait for it to finish", "Errors"), + TASK_IN_PROCESS("$1Task is already running.", "Error"), // DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"), diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java index 21014db70..7d2d824b4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java @@ -107,7 +107,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent { if (this.BScount > Settings.Chunk_Processor.MAX_TILES) { this.BSblocked = true; PlotSquared.debug( - Captions.PREFIX + "&cdetected unsafe WorldEdit: " + location.getX() + "," + Captions.PREFIX + "&cDetected unsafe WorldEdit: " + location.getX() + "," + location.getZ()); } if (WEManager @@ -162,7 +162,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent { if (this.Ecount > Settings.Chunk_Processor.MAX_ENTITIES) { this.Eblocked = true; PlotSquared.debug( - Captions.PREFIX + "&cdetected unsafe WorldEdit: " + location.getBlockX() + "," + Captions.PREFIX + "&cDetected unsafe WorldEdit: " + location.getBlockX() + "," + location.getBlockZ()); } if (WEManager.maskContains(this.mask, location.getBlockX(), location.getBlockY(),