Schematic list command

This commit is contained in:
sauilitired 2018-12-06 18:01:33 +01:00
parent 152e9e0e90
commit 820710721e
4 changed files with 453 additions and 213 deletions

View File

@ -1881,7 +1881,7 @@ import java.util.zip.ZipInputStream;
return plotAreaManager.getApplicablePlotArea(location); return plotAreaManager.getApplicablePlotArea(location);
} }
public PlotArea getPlotArea(@NonNull final String world, @NonNull final String id) { public PlotArea getPlotArea(@NonNull final String world, final String id) {
return plotAreaManager.getPlotArea(world, id); return plotAreaManager.getPlotArea(world, id);
} }

View File

@ -5,11 +5,8 @@ import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.C; import com.github.intellectualsites.plotsquared.plot.config.C;
import com.github.intellectualsites.plotsquared.plot.config.Settings; import com.github.intellectualsites.plotsquared.plot.config.Settings;
import com.github.intellectualsites.plotsquared.plot.object.*; import com.github.intellectualsites.plotsquared.plot.object.*;
import com.github.intellectualsites.plotsquared.plot.util.MainUtil; import com.github.intellectualsites.plotsquared.plot.util.*;
import com.github.intellectualsites.plotsquared.plot.util.Permissions;
import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler;
import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler.Schematic; import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler.Schematic;
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@ -210,6 +207,14 @@ public class SchematicCmd extends SubCommand {
MainUtil.sendMessage(player, "&7Starting export..."); MainUtil.sendMessage(player, "&7Starting export...");
} }
break; break;
case "list": {
if (!Permissions.hasPermission(player, C.PERMISSION_SCHEMATIC_LIST)) {
MainUtil.sendMessage(player, C.NO_PERMISSION, C.PERMISSION_SCHEMATIC_LIST);
return false;
}
final String string = StringMan.join(SchematicHandler.manager.getShematicNames(), "$2, $1");
C.SCHEMATIC_LIST.send(player, string);
} break;
default: default:
sendMessage(player, C.SCHEMATIC_MISSING_ARG); sendMessage(player, C.SCHEMATIC_MISSING_ARG);
break; break;

View File

@ -31,7 +31,8 @@ public enum C {
"static.flags"), FLAG_PLAYER_INTERACT("player-interact", "static.flags"), FLAG_PLAYER_INTERACT("player-interact",
"static.flags"), FLAG_TAMED_INTERACT("tamed-interact", "static.flags"), FLAG_TAMED_INTERACT("tamed-interact",
"static.flags"), FLAG_DISABLE_PHYSICS("disable-physics", "static.flags"), FLAG_MOB_PLACE( "static.flags"), FLAG_DISABLE_PHYSICS("disable-physics", "static.flags"), FLAG_MOB_PLACE(
"mob-place", "static.flags"), /* "mob-place", "static.flags"),
/*
* Static permission * Static permission
*/ */
PERMISSION_STAR("*", "static.permissions"), PERMISSION_ADMIN("plots.admin", PERMISSION_STAR("*", "static.permissions"), PERMISSION_ADMIN("plots.admin",
@ -133,18 +134,28 @@ public enum C {
"static.permissions"), PERMISSION_ADMIN_COMMAND_SAVE("plots.admin.command.save", "static.permissions"), PERMISSION_ADMIN_COMMAND_SAVE("plots.admin.command.save",
"static.permissions"), PERMISSION_ADMIN_COMMAND_SCHEMATIC_PASTE( "static.permissions"), PERMISSION_ADMIN_COMMAND_SCHEMATIC_PASTE(
"plots.admin.command.schematic.paste", "static.permissions"), PERMISSION_SCHEMATIC_PASTE( "plots.admin.command.schematic.paste", "static.permissions"), PERMISSION_SCHEMATIC_PASTE(
"plots.schematic.paste", "static.permissions"), PERMISSION_SCHEMATIC_SAVE( "plots.schematic.paste", "static.permissions"), PERMISSION_SCHEMATIC_LIST(
"plots.schematic.save", "static.permissions"), PERMISSION_ADMIN_COMMAND_SCHEMATIC_SAVE( "plots.schematic.list", "static.permissions"),
"plots.admin.command.schematic.save", "static.permissions"), PERMISSION_SET_COMPONENT(
"plots.set.%s0", "static.permissions"), PERMISSION_ADMIN_COMMAND("plots.admin.command.%s0", PERMISSION_SCHEMATIC_SAVE("plots.schematic.save",
"static.permissions"), PERMISSION_ADMIN_COMMAND_UNLINK("", "static.permissions"), PERMISSION_ADMIN_COMMAND_SCHEMATIC_SAVE(
"static.permissions"), PERMISSION_VISIT_UNOWNED("plots.visit.unowned", "plots.admin.command.schematic.save", "static.permissions"),
"static.permissions"), PERMISSION_VISIT_OWNED("plots.visit.owned",
"static.permissions"), PERMISSION_SHARED("plots.visit.shared", PERMISSION_SET_COMPONENT("plots.set.%s0", "static.permissions"), PERMISSION_ADMIN_COMMAND(
"static.permissions"), PERMISSION_VISIT_OTHER("plots.visit.other", "plots.admin.command.%s0", "static.permissions"),
"static.permissions"), PERMISSION_HOME("plots.home",
"static.permissions"), PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias", PERMISSION_ADMIN_COMMAND_UNLINK("", "static.permissions"), PERMISSION_VISIT_UNOWNED(
"plots.visit.unowned", "static.permissions"),
PERMISSION_VISIT_OWNED("plots.visit.owned", "static.permissions"), PERMISSION_SHARED(
"plots.visit.shared", "static.permissions"),
PERMISSION_VISIT_OTHER("plots.visit.other", "static.permissions"), PERMISSION_HOME("plots.home",
"static.permissions"),
PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias",
"static.permissions"), // Note this is for backwards compatibility "static.permissions"), // Note this is for backwards compatibility
PERMISSION_ALIAS_SET("plots.alias.set", "static.permissions"), PERMISSION_ALIAS_REMOVE( PERMISSION_ALIAS_SET("plots.alias.set", "static.permissions"), PERMISSION_ALIAS_REMOVE(
"plots.alias.remove", "static.permissions"), "plots.alias.remove", "static.permissions"),
@ -159,75 +170,113 @@ public enum C {
+ "Bug fixes and new features are influenced on metrics.", "static.console"), /* + "Bug fixes and new features are influenced on metrics.", "static.console"), /*
* Confirm * Confirm
*/ */
EXPIRED_CONFIRM("$2Confirmation has expired, please run the command again!", EXPIRED_CONFIRM("$2Confirmation has expired, please run the command again!",
"Confirm"), FAILED_CONFIRM("$2You have no pending actions to confirm!", "Confirm"), FAILED_CONFIRM("$2You have no pending actions to confirm!", "Confirm"),
"Confirm"), REQUIRES_CONFIRM(
REQUIRES_CONFIRM(
"$2Are you sure you wish to execute: $1%s$2?&-$2This cannot be undone! If you are sure: $1/plot confirm", "$2Are you sure you wish to execute: $1%s$2?&-$2This cannot be undone! If you are sure: $1/plot confirm",
"Confirm"), /* "Confirm"), /*
* Move * Move
*/ */
MOVE_SUCCESS("$4Successfully moved plot.", "Move"), COPY_SUCCESS("$4Successfully copied plot.", MOVE_SUCCESS("$4Successfully moved plot.", "Move"), COPY_SUCCESS("$4Successfully copied plot.",
"Move"), REQUIRES_UNOWNED("$2The location specified is already occupied.", "Move"), /* "Move"),
REQUIRES_UNOWNED("$2The location specified is already occupied.", "Move"), /*
* Area Create * Area Create
*/ */
SET_ATTRIBUTE("$4Successfully set %s0 set to %s1", "Set"), /* SET_ATTRIBUTE("$4Successfully set %s0 set to %s1", "Set"), /*
* Web * Web
*/ */
GENERATING_LINK("$1Processing plot...", "Web"), GENERATING_LINK_FAILED( GENERATING_LINK("$1Processing plot...", "Web"), GENERATING_LINK_FAILED(
"$2Failed to generate download link!", "Web"), SAVE_FAILED("$2Failed to save", "$2Failed to generate download link!", "Web"),
"Web"), LOAD_NULL("$2Please use $4/plot load $2to get a list of schematics",
"Web"), LOAD_FAILED("$2Failed to load schematic", "Web"), LOAD_LIST( SAVE_FAILED("$2Failed to save", "Web"), LOAD_NULL(
"$2To load a schematic, use $1/plot load #", "Web"), SAVE_SUCCESS("$1Successfully saved!", "$2Please use $4/plot load $2to get a list of schematics", "Web"),
"Web"), /*
LOAD_FAILED("$2Failed to load schematic", "Web"), LOAD_LIST(
"$2To load a schematic, use $1/plot load #", "Web"),
SAVE_SUCCESS("$1Successfully saved!", "Web"), /*
* Compass * Compass
*/ */
COMPASS_TARGET("$4Successfully targeted plot with compass", "Compass"), /* COMPASS_TARGET("$4Successfully targeted plot with compass", "Compass"), /*
* Cluster * Cluster
*/ */
CLUSTER_AVAILABLE_ARGS( CLUSTER_AVAILABLE_ARGS(
"$1The following sub commands are available: $4list$2, $4create$2, $4delete$2, $4resize$2, $4invite$2, $4kick$2, $4leave$2, " "$1The following sub commands are available: $4list$2, $4create$2, $4delete$2, $4resize$2, $4invite$2, $4kick$2, $4leave$2, "
+ "$4members$2, $4info$2, $4tp$2, $4sethome", "Cluster"), CLUSTER_LIST_HEADING( + "$4members$2, $4info$2, $4tp$2, $4sethome", "Cluster"), CLUSTER_LIST_HEADING(
"$2There are $1%s$2 clusters in this world", "Cluster"), CLUSTER_LIST_ELEMENT("$2 - $1%s&-", "$2There are $1%s$2 clusters in this world", "Cluster"),
"Cluster"), CLUSTER_INTERSECTION("$2The proposed area overlaps with: %s0",
"Cluster"), CLUSTER_OUTSIDE("$2The proposed area is outside the plot area: %s0", CLUSTER_LIST_ELEMENT("$2 - $1%s&-", "Cluster"), CLUSTER_INTERSECTION(
"Cluster"), CLUSTER_ADDED("$4Successfully created the cluster.", "$2The proposed area overlaps with: %s0", "Cluster"),
"Cluster"), CLUSTER_DELETED("$4Successfully deleted the cluster.",
"Cluster"), CLUSTER_RESIZED("$4Successfully resized the cluster.", CLUSTER_OUTSIDE("$2The proposed area is outside the plot area: %s0", "Cluster"), CLUSTER_ADDED(
"Cluster"), CLUSTER_ADDED_USER("$4Successfully added user to the cluster.", "$4Successfully created the cluster.", "Cluster"),
"Cluster"), CANNOT_KICK_PLAYER("$2You cannot kick that player", "Cluster"), CLUSTER_INVITED(
"$1You have been invited to the following cluster: $2%s", "Cluster"), CLUSTER_REMOVED( CLUSTER_DELETED("$4Successfully deleted the cluster.", "Cluster"), CLUSTER_RESIZED(
"$1You have been removed from cluster: $2%s", "Cluster"), CLUSTER_KICKED_USER( "$4Successfully resized the cluster.", "Cluster"),
"$4Successfully kicked the user", "Cluster"), INVALID_CLUSTER(
"$1Invalid cluster name: $2%s", "Cluster"), CLUSTER_NOT_ADDED( CLUSTER_ADDED_USER("$4Successfully added user to the cluster.", "Cluster"), CANNOT_KICK_PLAYER(
"$2That player was not added to the plot cluster", "Cluster"), CLUSTER_CANNOT_LEAVE( "$2You cannot kick that player", "Cluster"),
"$1You must delete or transfer ownership before leaving", "Cluster"), CLUSTER_ADDED_HELPER(
"$4Successfully added a helper to the cluster", "Cluster"), CLUSTER_REMOVED_HELPER( CLUSTER_INVITED("$1You have been invited to the following cluster: $2%s",
"$4Successfully removed a helper from the cluster", "Cluster"), CLUSTER_REGENERATED( "Cluster"), CLUSTER_REMOVED("$1You have been removed from cluster: $2%s", "Cluster"),
"$4Successfully started cluster regeneration", "Cluster"), CLUSTER_TELEPORTING(
"$4Teleporting...", "Cluster"), CLUSTER_INFO( CLUSTER_KICKED_USER("$4Successfully kicked the user", "Cluster"), INVALID_CLUSTER(
"$1Invalid cluster name: $2%s", "Cluster"),
CLUSTER_NOT_ADDED("$2That player was not added to the plot cluster",
"Cluster"), CLUSTER_CANNOT_LEAVE("$1You must delete or transfer ownership before leaving",
"Cluster"),
CLUSTER_ADDED_HELPER("$4Successfully added a helper to the cluster",
"Cluster"), CLUSTER_REMOVED_HELPER("$4Successfully removed a helper from the cluster",
"Cluster"),
CLUSTER_REGENERATED("$4Successfully started cluster regeneration",
"Cluster"), CLUSTER_TELEPORTING("$4Teleporting...", "Cluster"),
CLUSTER_INFO(
"$1Current cluster: $2%id%&-$1Name: $2%name%&-$1Owner: $2%owner%&-$1Size: $2%size%&-$1Rights: $2%rights%", "$1Current cluster: $2%id%&-$1Name: $2%name%&-$1Owner: $2%owner%&-$1Size: $2%size%&-$1Rights: $2%rights%",
"Cluster"), /* "Cluster"), /*
* Border * Border
*/ */
BORDER("$2You are outside the current map border", "Border"), /* BORDER("$2You are outside the current map border", "Border"), /*
* Unclaim * Unclaim
*/ */
UNCLAIM_SUCCESS("$4You successfully unclaimed the plot.", "Unclaim"), UNCLAIM_FAILED( UNCLAIM_SUCCESS("$4You successfully unclaimed the plot.", "Unclaim"), UNCLAIM_FAILED(
"$2Could not unclaim the plot", "Unclaim"), /* "$2Could not unclaim the plot", "Unclaim"), /*
* WorldEdit masks * WorldEdit masks
*/ */
WORLDEDIT_DELAYED("$2Please wait while we process your WorldEdit action...", WORLDEDIT_DELAYED("$2Please wait while we process your WorldEdit action...",
"WorldEdit Masks"), WORLDEDIT_RUN("$2Apologies for the delay. Now executing: %s", "WorldEdit Masks"), WORLDEDIT_RUN("$2Apologies for the delay. Now executing: %s",
"WorldEdit Masks"), REQUIRE_SELECTION_IN_MASK( "WorldEdit Masks"),
REQUIRE_SELECTION_IN_MASK(
"$2%s of your selection is not within your plot mask. You can only make edits within your plot.", "$2%s of your selection is not within your plot mask. You can only make edits within your plot.",
"WorldEdit Masks"), WORLDEDIT_VOLUME( "WorldEdit Masks"), WORLDEDIT_VOLUME(
"$2You cannot select a volume of %current%. The maximum volume you can modify is %max%.", "$2You cannot select a volume of %current%. The maximum volume you can modify is %max%.",
"WorldEdit Masks"), WORLDEDIT_ITERATIONS( "WorldEdit Masks"),
WORLDEDIT_ITERATIONS(
"$2You cannot iterate %current% times. The maximum number of iterations allowed is %max%.", "$2You cannot iterate %current% times. The maximum number of iterations allowed is %max%.",
"WorldEdit Masks"), WORLDEDIT_UNSAFE("$2Access to that command has been blocked", "WorldEdit Masks"), WORLDEDIT_UNSAFE("$2Access to that command has been blocked",
"WorldEdit Masks"), WORLDEDIT_BYPASS("$2&oTo bypass your restrictions use $4/plot wea", "WorldEdit Masks"),
WORLDEDIT_BYPASS("$2&oTo bypass your restrictions use $4/plot wea",
"WorldEdit Masks"), WORLDEDIT_BYPASSED("$2Currently bypassing WorldEdit restriction.", "WorldEdit Masks"), WORLDEDIT_BYPASSED("$2Currently bypassing WorldEdit restriction.",
"WorldEdit Masks"), WORLDEDIT_UNMASKED("$1Your WorldEdit is now unrestricted.", "WorldEdit Masks"),
WORLDEDIT_UNMASKED("$1Your WorldEdit is now unrestricted.",
"WorldEdit Masks"), WORLDEDIT_RESTRICTED("$1Your WorldEdit is now restricted.", "WorldEdit Masks"), WORLDEDIT_RESTRICTED("$1Your WorldEdit is now restricted.",
"WorldEdit Masks"), "WorldEdit Masks"),
@ -236,31 +285,43 @@ public enum C {
"Height Limit"), /* "Height Limit"), /*
* Records * Records
*/ */
RECORD_PLAY("$2%player $2started playing record $1%name", "Records"), NOTIFY_ENTER( RECORD_PLAY("$2%player $2started playing record $1%name", "Records"), NOTIFY_ENTER(
"$2%player $2entered your plot ($1%plot$2)", "Records"), NOTIFY_LEAVE( "$2%player $2entered your plot ($1%plot$2)", "Records"),
"$2%player $2left your plot ($1%plot$2)", "Records"), /*
NOTIFY_LEAVE("$2%player $2left your plot ($1%plot$2)", "Records"), /*
* Swap * Swap
*/ */
SWAP_OVERLAP("$2The proposed areas are not allowed to overlap", "Swap"), SWAP_DIMENSIONS( SWAP_OVERLAP("$2The proposed areas are not allowed to overlap", "Swap"), SWAP_DIMENSIONS(
"$2The proposed areas must have comparable dimensions", "Swap"), SWAP_SYNTAX( "$2The proposed areas must have comparable dimensions", "Swap"),
"$2/plot swap <id>", "Swap"), SWAP_SUCCESS("$4Successfully swapped plots",
"Swap"), STARTED_SWAP("$2Started plot swap task. You will be notified when it finishes", SWAP_SYNTAX("$2/plot swap <id>", "Swap"), SWAP_SUCCESS("$4Successfully swapped plots", "Swap"),
"Swap"), /*
STARTED_SWAP("$2Started plot swap task. You will be notified when it finishes", "Swap"), /*
* Comment * Comment
*/ */
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"), NOT_VALID_INBOX_INDEX( INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"), NOT_VALID_INBOX_INDEX(
"$2No comment at index %s", "Comment"), INBOX_ITEM("$2 - $4%s", "Comment"), COMMENT_SYNTAX( "$2No comment at index %s", "Comment"),
"$2Use /plot comment [X;Z] <%s> <comment>", "Comment"), INVALID_INBOX(
"$2That is not a valid inbox.&-$1Accepted values: %s", "Comment"), NO_PERM_INBOX( INBOX_ITEM("$2 - $4%s", "Comment"), COMMENT_SYNTAX("$2Use /plot comment [X;Z] <%s> <comment>",
"$2You do not have permission for that inbox", "Comment"), NO_PERM_INBOX_MODIFY( "Comment"),
"$2You do not have permission to modify that inbox", "Comment"), NO_PLOT_INBOX(
"$2You must stand in or supply a plot argument", "Comment"), COMMENT_REMOVED( INVALID_INBOX("$2That is not a valid inbox.&-$1Accepted values: %s", "Comment"), NO_PERM_INBOX(
"$4Successfully deleted comment/s:n$2 - '$3%s$2'", "Comment"), COMMENT_ADDED( "$2You do not have permission for that inbox", "Comment"),
"$4A comment has been left", "Comment"), COMMENT_HEADER(
"$2&m---------&r $1Comments $2&m---------&r", "Comment"), INBOX_EMPTY("$2No comments", NO_PERM_INBOX_MODIFY("$2You do not have permission to modify that inbox",
"Comment"), /* "Comment"), NO_PLOT_INBOX("$2You must stand in or supply a plot argument", "Comment"),
COMMENT_REMOVED("$4Successfully deleted comment/s:n$2 - '$3%s$2'", "Comment"), COMMENT_ADDED(
"$4A comment has been left", "Comment"),
COMMENT_HEADER("$2&m---------&r $1Comments $2&m---------&r", "Comment"), INBOX_EMPTY(
"$2No comments", "Comment"), /*
* Console * Console
*/ */
NOT_CONSOLE("$2For safety reasons, this command can only be executed by console.", NOT_CONSOLE("$2For safety reasons, this command can only be executed by console.",
"Console"), IS_CONSOLE("$2This command can only be executed by a player.", "Console"), "Console"), IS_CONSOLE("$2This command can only be executed by a player.", "Console"),
@ -268,7 +329,9 @@ public enum C {
Inventory Inventory
*/ */
INVENTORY_USAGE("&cUsage: &6{usage}", "Inventory"), INVENTORY_DESC("&cDescription: &6{desc}", INVENTORY_USAGE("&cUsage: &6{usage}", "Inventory"), INVENTORY_DESC("&cDescription: &6{desc}",
"Inventory"), INVENTORY_CATEGORY("&cCategory: &6{category}", "Inventory"), "Inventory"),
INVENTORY_CATEGORY("&cCategory: &6{category}", "Inventory"),
/* /*
* Clipboard * Clipboard
@ -277,196 +340,275 @@ public enum C {
"$2The current plot is now copied to your clipboard, use $1/plot paste$2 to paste it", "$2The current plot is now copied to your clipboard, use $1/plot paste$2 to paste it",
"Clipboard"), PASTED( "Clipboard"), PASTED(
"$4The plot selection was successfully pasted. It has been cleared from your clipboard.", "$4The plot selection was successfully pasted. It has been cleared from your clipboard.",
"Clipboard"), PASTE_FAILED("$2Failed to paste the selection. Reason: $2%s", "Clipboard"),
"Clipboard"), NO_CLIPBOARD("$2You don't have a selection in your clipboard",
"Clipboard"), CLIPBOARD_INFO( PASTE_FAILED("$2Failed to paste the selection. Reason: $2%s", "Clipboard"), NO_CLIPBOARD(
"$2You don't have a selection in your clipboard", "Clipboard"),
CLIPBOARD_INFO(
"$2Current Selection - Plot ID: $1%id$2, Width: $1%width$2, Total Blocks: $1%total$2", "$2Current Selection - Plot ID: $1%id$2, Width: $1%width$2, Total Blocks: $1%total$2",
"Clipboard"), /* "Clipboard"), /*
* Toggle * Toggle
*/ */
TOGGLE_ENABLED("$2Enabled setting: %s", "Toggle"), TOGGLE_DISABLED("$2Disabled setting: %s", TOGGLE_ENABLED("$2Enabled setting: %s", "Toggle"), TOGGLE_DISABLED("$2Disabled setting: %s",
"Toggle"), "Toggle"),
COMMAND_BLOCKED("$2That command is not allowed in this plot", "Blocked Command"), /* COMMAND_BLOCKED("$2That command is not allowed in this plot", "Blocked Command"), /*
* Done * Done
*/ */
DONE_ALREADY_DONE("$2This plot is already marked as done", "Done"), DONE_NOT_DONE( DONE_ALREADY_DONE("$2This plot is already marked as done", "Done"), DONE_NOT_DONE(
"$2This plot is not marked as done.", "Done"), DONE_INSUFFICIENT_COMPLEXITY( "$2This plot is not marked as done.", "Done"),
DONE_INSUFFICIENT_COMPLEXITY(
"$2This plot is too simple. Please add more detail before using this command.", "$2This plot is too simple. Please add more detail before using this command.",
"Done"), DONE_SUCCESS("$1Successfully marked this plot as done.", "Done"), DONE_REMOVED( "Done"), DONE_SUCCESS("$1Successfully marked this plot as done.", "Done"),
"$1You may now continue building in this plot.", "Done"), /*
DONE_REMOVED("$1You may now continue building in this plot.", "Done"), /*
* Ratings * Ratings
*/ */
RATINGS_PURGED("$2Purged ratings for this plot", "Ratings"), RATING_NOT_VALID( RATINGS_PURGED("$2Purged ratings for this plot", "Ratings"), RATING_NOT_VALID(
"$2You need to specify a number between 1 and 10", "Ratings"), RATING_ALREADY_EXISTS( "$2You need to specify a number between 1 and 10", "Ratings"),
"$2You have already rated plot $2%s", "Ratings"), RATING_APPLIED(
"$4You successfully rated plot $2%s", "Ratings"), RATING_NOT_YOUR_OWN( RATING_ALREADY_EXISTS("$2You have already rated plot $2%s", "Ratings"), RATING_APPLIED(
"$2You cannot rate your own plot", "Ratings"), RATING_NOT_DONE( "$4You successfully rated plot $2%s", "Ratings"),
"$2You can only rate finished plots.", "Ratings"), RATING_NOT_OWNED(
"$2You cannot rate a plot that is not claimed by anyone", "Ratings"), /* RATING_NOT_YOUR_OWN("$2You cannot rate your own plot", "Ratings"), RATING_NOT_DONE(
"$2You can only rate finished plots.", "Ratings"),
RATING_NOT_OWNED("$2You cannot rate a plot that is not claimed by anyone", "Ratings"), /*
* Tutorial * Tutorial
*/ */
RATE_THIS("$2Rate this plot!", "Tutorial"), COMMENT_THIS( RATE_THIS("$2Rate this plot!", "Tutorial"), COMMENT_THIS(
"$2Leave some feedback on this plot: %s", "Tutorial"), /* "$2Leave some feedback on this plot: %s", "Tutorial"), /*
* Economy Stuff * Economy Stuff
*/ */
ECON_DISABLED("$2Economy is not enabled", "Economy"), CANNOT_AFFORD_PLOT( ECON_DISABLED("$2Economy is not enabled", "Economy"), CANNOT_AFFORD_PLOT(
"$2You cannot afford to buy this plot. It costs $1%s", "Economy"), NOT_FOR_SALE( "$2You cannot afford to buy this plot. It costs $1%s", "Economy"),
"$2This plot is not for sale", "Economy"), CANNOT_BUY_OWN("$2You cannot buy your own plot",
"Economy"), PLOT_SOLD("$4Your plot; $1%s0$4, has been sold to $1%s1$4 for $1$%s2", NOT_FOR_SALE("$2This plot is not for sale", "Economy"), CANNOT_BUY_OWN(
"$2You cannot buy your own plot", "Economy"),
PLOT_SOLD("$4Your plot; $1%s0$4, has been sold to $1%s1$4 for $1$%s2",
"Economy"), CANNOT_AFFORD_MERGE("$2You cannot afford to merge the plots. It costs $1%s", "Economy"), CANNOT_AFFORD_MERGE("$2You cannot afford to merge the plots. It costs $1%s",
"Economy"), ADDED_BALANCE("$1%s $2has been added to your balance", "Economy"),
"Economy"), REMOVED_BALANCE("$1%s $2has been taken from your balance",
"Economy"), REMOVED_GRANTED_PLOT("$2You used %s plot grant(s), you've got $1%s $2left", ADDED_BALANCE("$1%s $2has been added to your balance", "Economy"), REMOVED_BALANCE(
"Economy"), /* "$1%s $2has been taken from your balance", "Economy"),
REMOVED_GRANTED_PLOT("$2You used %s plot grant(s), you've got $1%s $2left", "Economy"), /*
* Setup Stuff * Setup Stuff
*/ */
SETUP_INIT("$1Usage: $2/plot setup <value>", "Setup"), SETUP_STEP( SETUP_INIT("$1Usage: $2/plot setup <value>", "Setup"), SETUP_STEP(
"$3[$1Step %s0$3] $1%s1 $2- $1Expecting: $2%s2 $1Default: $2%s3", "$3[$1Step %s0$3] $1%s1 $2- $1Expecting: $2%s2 $1Default: $2%s3", "Setup"),
"Setup"), SETUP_INVALID_ARG(
SETUP_INVALID_ARG(
"$2%s0 is not a valid argument for step %s1. To cancel setup use: $1/plot setup cancel", "$2%s0 is not a valid argument for step %s1. To cancel setup use: $1/plot setup cancel",
"Setup"), SETUP_VALID_ARG("$2Value $1%s0 $2set to %s1", "Setup"), SETUP_FINISHED( "Setup"), SETUP_VALID_ARG("$2Value $1%s0 $2set to %s1", "Setup"),
SETUP_FINISHED(
"$4You should have been teleported to the created world. Otherwise you will need to set the generator manually using the bukkit.yml or " "$4You should have been teleported to the created world. Otherwise you will need to set the generator manually using the bukkit.yml or "
+ "your chosen world management plugin.", "Setup"), SETUP_WORLD_TAKEN( + "your chosen world management plugin.", "Setup"), SETUP_WORLD_TAKEN(
"$2%s is already a world", "Setup"), SETUP_MISSING_WORLD( "$2%s is already a world", "Setup"),
SETUP_MISSING_WORLD(
"$2You need to specify a world name ($1/plot setup &l<world>$1 <generator>$2)&-$1Additional commands:&-$2 - $1/plot setup <value>&-$2 -" "$2You need to specify a world name ($1/plot setup &l<world>$1 <generator>$2)&-$1Additional commands:&-$2 - $1/plot setup <value>&-$2 -"
+ " $1/plot setup back&-$2 - $1/plot setup cancel", "Setup"), SETUP_MISSING_GENERATOR( + " $1/plot setup back&-$2 - $1/plot setup cancel", "Setup"), SETUP_MISSING_GENERATOR(
"$2You need to specify a generator ($1/plot setup <world> &l<generator>&r$2)&-$1Additional commands:&-$2 - $1/plot setup <value>&-$2 - " "$2You need to specify a generator ($1/plot setup <world> &l<generator>&r$2)&-$1Additional commands:&-$2 - $1/plot setup <value>&-$2 - "
+ "$1/plot setup back&-$2 - $1/plot setup cancel", "Setup"), SETUP_INVALID_GENERATOR( + "$1/plot setup back&-$2 - $1/plot setup cancel", "Setup"),
"$2Invalid generator. Possible options: %s", "Setup"), /*
SETUP_INVALID_GENERATOR("$2Invalid generator. Possible options: %s", "Setup"), /*
* Schematic Stuff * Schematic Stuff
*/ */
SCHEMATIC_TOO_LARGE("$2The plot is too large for this action!", SCHEMATIC_TOO_LARGE("$2The plot is too large for this action!",
"Schematics"), SCHEMATIC_MISSING_ARG( "Schematics"), SCHEMATIC_MISSING_ARG(
"$2You need to specify an argument. Possible values: $1test <name>$2 , $1save$2 , $1paste $2, $1exportall", "$2You need to specify an argument. Possible values: $1test <name>$2 , $1save$2 , $1paste $2, $1exportall$2, $1list",
"Schematics"), SCHEMATIC_INVALID("$2That is not a valid schematic. Reason: $2%s", "Schematics"),
"Schematics"), SCHEMATIC_VALID("$2That is a valid schematic",
"Schematics"), SCHEMATIC_PASTE_FAILED("$2Failed to paste the schematic", SCHEMATIC_INVALID("$2That is not a valid schematic. Reason: $2%s",
"Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"), SCHEMATIC_VALID("$2That is a valid schematic", "Schematics"),
"Schematics"), /*
SCHEMATIC_PASTE_FAILED("$2Failed to paste the schematic",
"Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"),
SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics"),
/*
* Title Stuff * Title Stuff
*/ */
TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"), TITLE_ENTERED_PLOT_SUB("$4Owned by %s", TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"), TITLE_ENTERED_PLOT_SUB("$4Owned by %s",
"Titles"), PREFIX_GREETING("$1%id%$2> ", "Titles"), PREFIX_FAREWELL("$1%id%$2> ", "Titles"),
"Titles"), /*
PREFIX_GREETING("$1%id%$2> ", "Titles"), PREFIX_FAREWELL("$1%id%$2> ", "Titles"), /*
* Core Stuff * Core Stuff
*/ */
TASK_START("Starting task...", "Core"), PREFIX("$3[$1P2$3] $2", "Core"), ENABLED(
"$1%s0 is now enabled", "Core"), /* TASK_START("Starting task...", "Core"), PREFIX("$3[$1P2$3] $2", "Core"),
ENABLED("$1%s0 is now enabled", "Core"), /*
* Reload * Reload
*/ */
RELOADED_CONFIGS("$1Translations and world settings have been reloaded", RELOADED_CONFIGS("$1Translations and world settings have been reloaded",
"Reload"), RELOAD_FAILED("$2Failed to reload file configurations", "Reload"), "Reload"), RELOAD_FAILED("$2Failed to reload file configurations", "Reload"),
/* /*
* BarAPI * BarAPI
*/ */
DESC_SET("$2Plot description set", "Desc"), DESC_UNSET("$2Plot description unset", DESC_SET("$2Plot description set", "Desc"), DESC_UNSET("$2Plot description unset", "Desc"),
"Desc"), MISSING_DESC("$2You need to specify a description", "Desc"),
MISSING_DESC("$2You need to specify a description", "Desc"),
/* /*
* Alias * Alias
*/ */
ALIAS_SET_TO("$2Plot alias set to $1%alias%", "Alias"), ALIAS_REMOVED("$2Plot alias removed", ALIAS_SET_TO("$2Plot alias set to $1%alias%", "Alias"), ALIAS_REMOVED("$2Plot alias removed",
"Alias"), MISSING_ALIAS("$2You need to specify an alias", "Alias"), ALIAS_TOO_LONG( "Alias"),
"$2The alias must be < 50 characters in length", "Alias"), ALIAS_IS_TAKEN(
"$2That alias is already taken", "Alias"), /* MISSING_ALIAS("$2You need to specify an alias", "Alias"), ALIAS_TOO_LONG(
"$2The alias must be < 50 characters in length", "Alias"),
ALIAS_IS_TAKEN("$2That alias is already taken", "Alias"), /*
* Position * Position
*/ */
MISSING_POSITION("$2You need to specify a position. Possible values: $1none", MISSING_POSITION("$2You need to specify a position. Possible values: $1none",
"Position"), POSITION_SET("$1Home position set to your current location", "Position"), POSITION_SET("$1Home position set to your current location", "Position"),
"Position"), POSITION_UNSET("$1Home position reset to the default location",
"Position"), HOME_ARGUMENT("$2Use /plot set home [none]", "Position"), INVALID_POSITION( POSITION_UNSET("$1Home position reset to the default location", "Position"), HOME_ARGUMENT(
"$2That is not a valid position value", "Position"), /* "$2Use /plot set home [none]", "Position"),
INVALID_POSITION("$2That is not a valid position value", "Position"), /*
* Cap * Cap
*/ */
ENTITY_CAP("$2You are not allowed to spawn more mobs", "cap"), /* ENTITY_CAP("$2You are not allowed to spawn more mobs", "cap"), /*
* Time * Time
*/ */
TIME_FORMAT("$1%hours%, %min%, %sec%", "Time"), /* TIME_FORMAT("$1%hours%, %min%, %sec%", "Time"), /*
* Permission * Permission
*/ */
NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s", NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s",
"Permission"), NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission"), NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission"),
"Permission"), NO_PERMISSION_EVENT("$2You are lacking the permission node: $1%s",
"Permission"), NO_PLOT_PERMS("$2You must be the plot owner to perform this action", NO_PERMISSION_EVENT("$2You are lacking the permission node: $1%s", "Permission"), NO_PLOT_PERMS(
"Permission"), CANT_CLAIM_MORE_PLOTS("$2You can't claim more plots.", "$2You must be the plot owner to perform this action", "Permission"),
"Permission"), CANT_CLAIM_MORE_CLUSTERS("$2You can't claim more clusters.",
"Permission"), CANT_TRANSFER_MORE_PLOTS("$2You can't send more plots to that user", CANT_CLAIM_MORE_PLOTS("$2You can't claim more plots.", "Permission"), CANT_CLAIM_MORE_CLUSTERS(
"$2You can't claim more clusters.", "Permission"),
CANT_TRANSFER_MORE_PLOTS("$2You can't send more plots to that user",
"Permission"), CANT_CLAIM_MORE_PLOTS_NUM("$2You can't claim more than $1%s $2plots at once", "Permission"), CANT_CLAIM_MORE_PLOTS_NUM("$2You can't claim more than $1%s $2plots at once",
"Permission"), YOU_BE_DENIED("$2You are not allowed to enter this plot", "Permission"), "Permission"),
YOU_BE_DENIED("$2You are not allowed to enter this plot", "Permission"),
/* /*
* Merge * Merge
*/ */
MERGE_NOT_VALID("$2This merge request is no longer valid.", "Merge"), MERGE_ACCEPTED( MERGE_NOT_VALID("$2This merge request is no longer valid.", "Merge"), MERGE_ACCEPTED(
"$2The merge request has been accepted", "Merge"), SUCCESS_MERGE( "$2The merge request has been accepted", "Merge"),
"$2Plots have been merged!", "Merge"), MERGE_REQUESTED(
"$2Successfully sent a merge request", "Merge"), MERGE_REQUEST_CONFIRM( SUCCESS_MERGE("$2Plots have been merged!", "Merge"), MERGE_REQUESTED(
"Merge request from %s", "Permission"), NO_PERM_MERGE( "$2Successfully sent a merge request", "Merge"),
"$2You are not the owner of the plot: $1%plot%", "Merge"), NO_AVAILABLE_AUTOMERGE(
MERGE_REQUEST_CONFIRM("Merge request from %s", "Permission"), NO_PERM_MERGE(
"$2You are not the owner of the plot: $1%plot%", "Merge"),
NO_AVAILABLE_AUTOMERGE(
"$2You do not own any adjacent plots in the specified direction or are not allowed to merge to the required size.", "$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"), UNLINK_REQUIRED("$2An unlink is required to do this.", "Merge"),
"Merge"), UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS(
UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS(
"$2Successfully unlinked plots.", "Merge"), /* "$2Successfully unlinked plots.", "Merge"), /*
* CommandConfig * CommandConfig
*/ */
NOT_VALID_SUBCOMMAND("$2That is not a valid subcommand", "CommandConfig"), DID_YOU_MEAN( NOT_VALID_SUBCOMMAND("$2That is not a valid subcommand", "CommandConfig"), DID_YOU_MEAN(
"$2Did you mean: $1%s", "CommandConfig"), NAME_LITTLE( "$2Did you mean: $1%s", "CommandConfig"),
"$2%s0 name is too short, $1%s1$2<$1%s3", "CommandConfig"), NO_COMMANDS(
"$2I'm sorry, but you're not permitted to use any subcommands.", NAME_LITTLE("$2%s0 name is too short, $1%s1$2<$1%s3", "CommandConfig"), NO_COMMANDS(
"CommandConfig"), SUBCOMMAND_SET_OPTIONS_HEADER("$2Possible Values: ", "$2I'm sorry, but you're not permitted to use any subcommands.", "CommandConfig"),
"CommandConfig"), COMMAND_SYNTAX("$1Usage: $2%s", "CommandConfig"), /*
SUBCOMMAND_SET_OPTIONS_HEADER("$2Possible Values: ", "CommandConfig"), COMMAND_SYNTAX(
"$1Usage: $2%s", "CommandConfig"), /*
* Player not found * Player not found
*/ */
INVALID_PLAYER_WAIT("$2Player not found: $1%s$2, fetching it. Try again soon.", INVALID_PLAYER_WAIT("$2Player not found: $1%s$2, fetching it. Try again soon.",
"Errors"), INVALID_PLAYER("$2Player not found: $1%s$2.", "Errors"), INVALID_PLAYER_OFFLINE( "Errors"), INVALID_PLAYER("$2Player not found: $1%s$2.", "Errors"),
"$2The player must be online: $1%s.", "Errors"), /*
INVALID_PLAYER_OFFLINE("$2The player must be online: $1%s.", "Errors"), /*
* Command flag * Command flag
*/ */
INVALID_COMMAND_FLAG("$2Invalid command flag: %s0", "Errors"), /* INVALID_COMMAND_FLAG("$2Invalid command flag: %s0", "Errors"), /*
* Unknown Error * Unknown Error
*/ */
ERROR("$2An error occurred: %s", ERROR("$2An error occurred: %s",
"Errors"), // SETTINGS_PASTE_UPLOADED("$2settings.yml was uploaded to: $1%url%", "Paste"), "Errors"), // SETTINGS_PASTE_UPLOADED("$2settings.yml was uploaded to: $1%url%", "Paste"),
// LATEST_LOG_UPLOADED("$2latest.log was uploaded to: $1%url%", "Paste"), // LATEST_LOG_UPLOADED("$2latest.log was uploaded to: $1%url%", "Paste"),
DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"), /* DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"), /*
* *
*/ */
COMMAND_WENT_WRONG("$2Something went wrong when executing that command...", "Errors"), /* COMMAND_WENT_WRONG("$2Something went wrong when executing that command...", "Errors"), /*
* purge * purge
*/ */
PURGE_SUCCESS("$4Successfully purged %s plots", "Purge"), /* PURGE_SUCCESS("$4Successfully purged %s plots", "Purge"), /*
* trim * trim
*/ */
TRIM_IN_PROGRESS("A world trim task is already in progress!", TRIM_IN_PROGRESS("A world trim task is already in progress!",
"Trim"), NOT_VALID_HYBRID_PLOT_WORLD( "Trim"), NOT_VALID_HYBRID_PLOT_WORLD(
"The hybrid plot manager is required to perform this action", "Trim"), /* "The hybrid plot manager is required to perform this action", "Trim"), /*
* No <plot> * No <plot>
*/ */
NO_FREE_PLOTS("$2There are no free plots available", "Errors"), NOT_IN_PLOT( NO_FREE_PLOTS("$2There are no free plots available", "Errors"), NOT_IN_PLOT(
"$2You're not in a plot", "Errors"), NOT_LOADED("$2The plot could not be loaded", "$2You're not in a plot", "Errors"),
"Errors"), NOT_IN_CLUSTER("$2You must be within a plot cluster to perform that action",
"Errors"), NOT_IN_PLOT_WORLD("$2You're not in a plot area", NOT_LOADED("$2The plot could not be loaded", "Errors"), NOT_IN_CLUSTER(
"Errors"), PLOTWORLD_INCOMPATIBLE("$2The two worlds must be compatible", "$2You must be within a plot cluster to perform that action", "Errors"),
"Errors"), NOT_VALID_WORLD("$2That is not a valid world (case sensitive)",
"Errors"), NOT_VALID_PLOT_WORLD("$2That is not a valid plot area (case sensitive)", NOT_IN_PLOT_WORLD("$2You're not in a plot area", "Errors"), PLOTWORLD_INCOMPATIBLE(
"Errors"), NO_PLOTS("$2You don't have any plots", "Errors"), /* "$2The two worlds must be compatible", "Errors"),
NOT_VALID_WORLD("$2That is not a valid world (case sensitive)", "Errors"), NOT_VALID_PLOT_WORLD(
"$2That is not a valid plot area (case sensitive)", "Errors"),
NO_PLOTS("$2You don't have any plots", "Errors"), /*
* Block List * Block List
*/ */
BLOCK_LIST_SEPARATER("$1,$2 ", "Block List"), /* BLOCK_LIST_SEPARATER("$1,$2 ", "Block List"), /*
* Biome * Biome
*/ */
NEED_BIOME("$2You need to specify a valid biome.", "Biome"), BIOME_SET_TO( NEED_BIOME("$2You need to specify a valid biome.", "Biome"), BIOME_SET_TO(
"$2Plot biome set to $2", "Biome"), /* "$2Plot biome set to $2", "Biome"), /*
* Teleport / Entry * Teleport / Entry
*/ */
TELEPORTED_TO_PLOT("$1You have been teleported", "Teleport"), TELEPORTED_TO_ROAD( TELEPORTED_TO_PLOT("$1You have been teleported", "Teleport"), TELEPORTED_TO_ROAD(
"$2You got teleported to the road", "Teleport"), TELEPORT_IN_SECONDS( "$2You got teleported to the road", "Teleport"),
"$1Teleporting in %s seconds. Do not move...", "Teleport"), TELEPORT_FAILED(
TELEPORT_IN_SECONDS("$1Teleporting in %s seconds. Do not move...", "Teleport"), TELEPORT_FAILED(
"$2Teleportation cancelled due to movement or damage", "Teleport"), /* "$2Teleportation cancelled due to movement or damage", "Teleport"), /*
* Set Block * Set Block
*/ */
SET_BLOCK_ACTION_FINISHED("$1The last setblock action is now finished.", "Set Block"), SET_BLOCK_ACTION_FINISHED("$1The last setblock action is now finished.", "Set Block"),
/* /*
@ -476,162 +618,236 @@ public enum C {
"$2Unsafe actions disabled", "unsafe"), /* "$2Unsafe actions disabled", "unsafe"), /*
* Debug * Debug
*/ */
DEBUG_HEADER("$1Debug Information&-", "Debug"), DEBUG_SECTION("$2>> $1&l%val%",
"Debug"), DEBUG_LINE("$2>> $1%var%$2:$1 %val%&-", "Debug"), /* DEBUG_HEADER("$1Debug Information&-", "Debug"), DEBUG_SECTION("$2>> $1&l%val%", "Debug"),
DEBUG_LINE("$2>> $1%var%$2:$1 %val%&-", "Debug"), /*
* Invalid * Invalid
*/ */
NOT_VALID_DATA("$2That's not a valid data id.", "Invalid"), NOT_VALID_BLOCK( NOT_VALID_DATA("$2That's not a valid data id.", "Invalid"), NOT_VALID_BLOCK(
"$2That's not a valid block: %s", "Invalid"), NOT_ALLOWED_BLOCK( "$2That's not a valid block: %s", "Invalid"),
"$2That block is not allowed: %s", "Invalid"), NOT_VALID_NUMBER(
"$2That's not a valid number within the range: %s", "Invalid"), NOT_VALID_PLOT_ID( NOT_ALLOWED_BLOCK("$2That block is not allowed: %s", "Invalid"), NOT_VALID_NUMBER(
"$2That's not a valid plot id.", "Invalid"), PLOT_ID_FORM( "$2That's not a valid number within the range: %s", "Invalid"),
"$2The plot id must be in the form: $1X;Y $2e.g. $1-5;7", "Invalid"), NOT_YOUR_PLOT(
"$2That is not your plot.", "Invalid"), NO_SUCH_PLOT("$2There is no such plot", NOT_VALID_PLOT_ID("$2That's not a valid plot id.", "Invalid"), PLOT_ID_FORM(
"Invalid"), PLAYER_HAS_NOT_BEEN_ON("$2That player hasn't been in the plotworld", "$2The plot id must be in the form: $1X;Y $2e.g. $1-5;7", "Invalid"),
"Invalid"), FOUND_NO_PLOTS("$2Found no plots with your search query",
"Invalid"), FOUND_NO_PLOTS_FOR_PLAYER("$2No plots found for player: %s", "Invalid"), /* NOT_YOUR_PLOT("$2That is not your plot.", "Invalid"), NO_SUCH_PLOT("$2There is no such plot",
"Invalid"),
PLAYER_HAS_NOT_BEEN_ON("$2That player hasn't been in the plotworld", "Invalid"), FOUND_NO_PLOTS(
"$2Found no plots with your search query", "Invalid"),
FOUND_NO_PLOTS_FOR_PLAYER("$2No plots found for player: %s", "Invalid"), /*
* Camera * Camera
*/ */
CAMERA_STARTED("$2You have entered camera mode for plot $1%s", "Camera"), CAMERA_STOPPED( CAMERA_STARTED("$2You have entered camera mode for plot $1%s", "Camera"), CAMERA_STOPPED(
"$2You are no longer in camera mode", "Camera"), /* "$2You are no longer in camera mode", "Camera"), /*
* Need * Need
*/ */
NEED_PLOT_NUMBER("$2You've got to specify a plot number or alias", "Need"), NEED_BLOCK( NEED_PLOT_NUMBER("$2You've got to specify a plot number or alias", "Need"), NEED_BLOCK(
"$2You've got to specify a block", "Need"), NEED_PLOT_ID( "$2You've got to specify a block", "Need"),
"$2You've got to specify a plot id.", "Need"), NEED_PLOT_WORLD(
"$2You've got to specify a plot area.", "Need"), NEED_USER( NEED_PLOT_ID("$2You've got to specify a plot id.", "Need"), NEED_PLOT_WORLD(
"$2You need to specify a username", "Need"), /* "$2You've got to specify a plot area.", "Need"),
NEED_USER("$2You need to specify a username", "Need"), /*
* Near * Near
*/ */
PLOT_NEAR("$1Players: %s0", "Near"), /* PLOT_NEAR("$1Players: %s0", "Near"), /*
* Info * Info
*/ */
NONE("None", "Info"), NOW("Now", "Info"), NEVER("Never", "Info"), UNKNOWN("Unknown",
"Info"), EVERYONE("Everyone", "Info"), PLOT_UNOWNED( NONE("None", "Info"), NOW("Now", "Info"),
"$2The current plot must have an owner to perform this action",
"Info"), PLOT_INFO_UNCLAIMED("$2Plot $1%s$2 is not yet claimed", "Info"), PLOT_INFO_HEADER( NEVER("Never", "Info"), UNKNOWN("Unknown", "Info"),
"$3&m---------&r $1INFO $3&m---------", false, "Info"), PLOT_INFO(
"$1ID: $2%id%$1&-" + "$1Alias: $2%alias%$1&-" + "$1Owner: $2%owner%$1&-" EVERYONE("Everyone", "Info"), PLOT_UNOWNED(
"$2The current plot must have an owner to perform this action", "Info"),
PLOT_INFO_UNCLAIMED("$2Plot $1%s$2 is not yet claimed", "Info"), PLOT_INFO_HEADER(
"$3&m---------&r $1INFO $3&m---------", false, "Info"),
PLOT_INFO("$1ID: $2%id%$1&-" + "$1Alias: $2%alias%$1&-" + "$1Owner: $2%owner%$1&-"
+ "$1Biome: $2%biome%$1&-" + "$1Can Build: $2%build%$1&-" + "$1Rating: $2%rating%&-" + "$1Biome: $2%biome%$1&-" + "$1Can Build: $2%build%$1&-" + "$1Rating: $2%rating%&-"
+ "$1Seen: $2%seen%&-" + "$1Trusted: $2%trusted%$1&-" + "$1Members: $2%members%$1&-" + "$1Seen: $2%seen%&-" + "$1Trusted: $2%trusted%$1&-" + "$1Members: $2%members%$1&-"
+ "$1Denied: $2%denied%$1&-" + "$1Flags: $2%flags%", "Info"), PLOT_INFO_FOOTER( + "$1Denied: $2%denied%$1&-" + "$1Flags: $2%flags%", "Info"), PLOT_INFO_FOOTER(
"$3&m---------&r $1INFO $3&m---------", false, "Info"), PLOT_INFO_TRUSTED( "$3&m---------&r $1INFO $3&m---------", false, "Info"),
"$1Trusted:$2 %trusted%", "Info"), PLOT_INFO_MEMBERS("$1Members:$2 %members%",
"Info"), PLOT_INFO_DENIED("$1Denied:$2 %denied%", "Info"), PLOT_INFO_FLAGS( PLOT_INFO_TRUSTED("$1Trusted:$2 %trusted%", "Info"), PLOT_INFO_MEMBERS("$1Members:$2 %members%",
"$1Flags:$2 %flags%", "Info"), PLOT_INFO_BIOME("$1Biome:$2 %biome%", "Info"),
"Info"), PLOT_INFO_RATING("$1Rating:$2 %rating%", "Info"), PLOT_INFO_OWNER(
"$1Owner:$2 %owner%", "Info"), PLOT_INFO_ID("$1ID:$2 %id%", "Info"), PLOT_INFO_ALIAS( PLOT_INFO_DENIED("$1Denied:$2 %denied%", "Info"), PLOT_INFO_FLAGS("$1Flags:$2 %flags%", "Info"),
"$1Alias:$2 %alias%", "Info"), PLOT_INFO_SIZE("$1Size:$2 %size%", "Info"), PLOT_INFO_SEEN(
"$1Seen:$2 %seen%", "Info"), PLOT_USER_LIST(" $1%user%$2,", "Info"), PLOT_FLAG_LIST( PLOT_INFO_BIOME("$1Biome:$2 %biome%", "Info"), PLOT_INFO_RATING("$1Rating:$2 %rating%", "Info"),
"$1%s0:%s1$2", "Info"), INFO_SYNTAX_CONSOLE("$2/plot info X;Y", "Info"), /*
PLOT_INFO_OWNER("$1Owner:$2 %owner%", "Info"), PLOT_INFO_ID("$1ID:$2 %id%", "Info"),
PLOT_INFO_ALIAS("$1Alias:$2 %alias%", "Info"), PLOT_INFO_SIZE("$1Size:$2 %size%", "Info"),
PLOT_INFO_SEEN("$1Seen:$2 %seen%", "Info"), PLOT_USER_LIST(" $1%user%$2,", "Info"),
PLOT_FLAG_LIST("$1%s0:%s1$2", "Info"), INFO_SYNTAX_CONSOLE("$2/plot info X;Y", "Info"), /*
* Generating * Generating
*/ */
GENERATING_COMPONENT("$1Started generating component from your settings", "Working"), /* GENERATING_COMPONENT("$1Started generating component from your settings", "Working"), /*
* Clearing * Clearing
*/ */
CLEARING_PLOT("$2Clearing plot async.", "Working"), CLEARING_DONE( CLEARING_PLOT("$2Clearing plot async.", "Working"), CLEARING_DONE(
"$4Clear completed! Took %sms.", "Working"), DELETING_DONE("$4Delete completed! Took %sms.", "$4Clear completed! Took %sms.", "Working"),
"Working"), /*
DELETING_DONE("$4Delete completed! Took %sms.", "Working"), /*
* Claiming * Claiming
*/ */
PLOT_NOT_CLAIMED("$2Plot not claimed", "Working"), PLOT_IS_CLAIMED( PLOT_NOT_CLAIMED("$2Plot not claimed", "Working"), PLOT_IS_CLAIMED(
"$2This plot is already claimed", "Working"), CLAIMED("$4You successfully claimed the plot", "$2This plot is already claimed", "Working"),
"Working"), /*
CLAIMED("$4You successfully claimed the plot", "Working"), /*
* List * List
*/ */
COMMENT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% comments", COMMENT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% comments",
"List"), CLICKABLE(" (interactive)", "List"), AREA_LIST_HEADER_PAGED( "List"), CLICKABLE(" (interactive)", "List"),
"$2(Page $1%cur$2/$1%max$2) $1List of %amount% areas", "List"), PLOT_LIST_HEADER_PAGED(
"$2(Page $1%cur$2/$1%max$2) $1List of %amount% plots", "List"), PLOT_LIST_HEADER( AREA_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% areas",
"$1List of %word% plots", "List"), PLOT_LIST_ITEM("$2>> $1%id$2:$1%world $2- $1%owner", "List"), PLOT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% plots",
"List"), PLOT_LIST_ITEM_ORDERED("$2[$1%in$2] >> $1%id$2:$1%world $2- $1%owner", "List"),
PLOT_LIST_HEADER("$1List of %word% plots", "List"), PLOT_LIST_ITEM(
"$2>> $1%id$2:$1%world $2- $1%owner", "List"),
PLOT_LIST_ITEM_ORDERED("$2[$1%in$2] >> $1%id$2:$1%world $2- $1%owner",
"List"), PLOT_LIST_FOOTER("$2>> $1%word% a total of $2%num% $1claimed %plot%.", "List"), /* "List"), PLOT_LIST_FOOTER("$2>> $1%word% a total of $2%num% $1claimed %plot%.", "List"), /*
* Left * Left
*/ */
LEFT_PLOT("$2You left a plot", "Left"), /* LEFT_PLOT("$2You left a plot", "Left"), /*
* Wait * Wait
*/ */
WAIT_FOR_TIMER( WAIT_FOR_TIMER(
"$2A setblock timer is bound to either the current plot or you. Please wait for it to finish", "$2A setblock timer is bound to either the current plot or you. Please wait for it to finish",
"Errors"), /* "Errors"), /*
* Chat * Chat
*/ */
PLOT_CHAT_SPY_FORMAT("$2[$1Plot Spy$2][$1%plot_id%$2] $1%sender%$2: $1%msg%", PLOT_CHAT_SPY_FORMAT("$2[$1Plot Spy$2][$1%plot_id%$2] $1%sender%$2: $1%msg%",
"Chat"), PLOT_CHAT_FORMAT("$2[$1Plot Chat$2][$1%plot_id%$2] $1%sender%$2: $1%msg%", "Chat"), PLOT_CHAT_FORMAT("$2[$1Plot Chat$2][$1%plot_id%$2] $1%sender%$2: $1%msg%", "Chat"),
"Chat"), PLOT_CHAT_FORCED("$2This world forces everyone to use plot chat.",
"Chat"), PLOT_CHAT_ON("$4Plot chat enabled.", "Chat"), PLOT_CHAT_OFF( PLOT_CHAT_FORCED("$2This world forces everyone to use plot chat.", "Chat"), PLOT_CHAT_ON(
"$4Plot chat disabled.", "Chat"), /* "$4Plot chat enabled.", "Chat"),
PLOT_CHAT_OFF("$4Plot chat disabled.", "Chat"), /*
* Denied * Denied
*/ */
DENIED_REMOVED("$4You successfully undenied the player from this plot", "Deny"), DENIED_ADDED( DENIED_REMOVED("$4You successfully undenied the player from this plot", "Deny"), DENIED_ADDED(
"$4You successfully denied the player from this plot", "Deny"), DENIED_NEED_ARGUMENT( "$4You successfully denied the player from this plot", "Deny"),
DENIED_NEED_ARGUMENT(
"$2Arguments are missing. $1/plot denied add <name> $2or $1/plot denied remove <name>", "$2Arguments are missing. $1/plot denied add <name> $2or $1/plot denied remove <name>",
"Deny"), WAS_NOT_DENIED("$2That player was not denied on this plot", "Deny"), WAS_NOT_DENIED("$2That player was not denied on this plot", "Deny"),
"Deny"), YOU_GOT_DENIED(
YOU_GOT_DENIED(
"$4You are denied from the plot you were previously on, and got teleported to spawn", "$4You are denied from the plot you were previously on, and got teleported to spawn",
"Deny"), /* "Deny"), /*
* Kick * Kick
*/ */
YOU_GOT_KICKED("$4You got kicked!", "Kick"), /* YOU_GOT_KICKED("$4You got kicked!", "Kick"), /*
* Rain * Rain
*/ */
NEED_ON_OFF("$2You need to specify a value. Possible values: $1on$2, $1off", NEED_ON_OFF("$2You need to specify a value. Possible values: $1on$2, $1off",
"Rain"), SETTING_UPDATED("$4You successfully updated the setting", "Rain"), /* "Rain"), SETTING_UPDATED("$4You successfully updated the setting", "Rain"), /*
* Flag * Flag
*/ */
FLAG_KEY("$2Key: %s", "Flag"), FLAG_TYPE("$2Type: %s", "Flag"), FLAG_DESC("$2Desc: %s",
"Flag"), NOT_VALID_FLAG("$2That is not a valid flag", "Flag"), NOT_VALID_FLAG_SUGGESTED( FLAG_KEY("$2Key: %s", "Flag"), FLAG_TYPE("$2Type: %s", "Flag"),
"$2That is not a valid flag. Did you mean: $1%s", "Flag"), NOT_VALID_VALUE(
"$2Flag values must be alphanumerical", "Flag"), FLAG_NOT_IN_PLOT( FLAG_DESC("$2Desc: %s", "Flag"), NOT_VALID_FLAG("$2That is not a valid flag", "Flag"),
"$2The plot does not have that flag", "Flag"), FLAG_NOT_REMOVED(
"$2The flag could not be removed", "Flag"), FLAG_NOT_ADDED("$2The flag could not be added", NOT_VALID_FLAG_SUGGESTED("$2That is not a valid flag. Did you mean: $1%s",
"Flag"), FLAG_REMOVED("$4Successfully removed flag", "Flag"), FLAG_ADDED( "Flag"), NOT_VALID_VALUE("$2Flag values must be alphanumerical", "Flag"),
"$4Successfully added flag", "Flag"), FLAG_TUTORIAL_USAGE(
FLAG_NOT_IN_PLOT("$2The plot does not have that flag", "Flag"), FLAG_NOT_REMOVED(
"$2The flag could not be removed", "Flag"),
FLAG_NOT_ADDED("$2The flag could not be added", "Flag"), FLAG_REMOVED(
"$4Successfully removed flag", "Flag"),
FLAG_ADDED("$4Successfully added flag", "Flag"), FLAG_TUTORIAL_USAGE(
"$1Have an admin set the flag: $2%s", "CommandConfig"), /* "$1Have an admin set the flag: $2%s", "CommandConfig"), /*
* Trusted * Trusted
*/ */
TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"), TRUSTED_REMOVED( TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"), TRUSTED_REMOVED(
"$4You successfully removed a trusted user from the plot", "Trusted"), WAS_NOT_ADDED( "$4You successfully removed a trusted user from the plot", "Trusted"),
"$2That player was not trusted on this plot", "Trusted"), PLOT_REMOVED_USER(
WAS_NOT_ADDED("$2That player was not trusted on this plot", "Trusted"), PLOT_REMOVED_USER(
"$1Plot %s of which you were added to has been deleted due to owner inactivity", "$1Plot %s of which you were added to has been deleted due to owner inactivity",
"Trusted"), /* "Trusted"), /*
* Member * Member
*/ */
REMOVED_PLAYERS("$2Removed %s players from this plot.", "Member"), ALREADY_OWNER( REMOVED_PLAYERS("$2Removed %s players from this plot.", "Member"), ALREADY_OWNER(
"$2That user is already the plot owner: %s0", "Member"), ALREADY_ADDED( "$2That user is already the plot owner: %s0", "Member"),
"$2That user is already added to that category: %s0", "Member"), MEMBER_ADDED(
"$4That user can now build while the plot owner is online", "Member"), MEMBER_REMOVED( ALREADY_ADDED("$2That user is already added to that category: %s0", "Member"), MEMBER_ADDED(
"$1You successfully removed a user from the plot", "Member"), MEMBER_WAS_NOT_ADDED( "$4That user can now build while the plot owner is online", "Member"),
"$2That player was not added as a user on this plot", "Member"), PLOT_MAX_MEMBERS(
"$2You are not allowed to add any more players to this plot", "Member"), /* MEMBER_REMOVED("$1You successfully removed a user from the plot",
"Member"), MEMBER_WAS_NOT_ADDED("$2That player was not added as a user on this plot",
"Member"),
PLOT_MAX_MEMBERS("$2You are not allowed to add any more players to this plot", "Member"), /*
* Set Owner * Set Owner
*/ */
SET_OWNER("$4You successfully set the plot owner", "Owner"), SET_OWNER_CANCELLED( SET_OWNER("$4You successfully set the plot owner", "Owner"), SET_OWNER_CANCELLED(
"$2The setowner action was cancelled", "Owner"), NOW_OWNER("$4You are now owner of plot %s", "$2The setowner action was cancelled", "Owner"),
"Owner"), /*
NOW_OWNER("$4You are now owner of plot %s", "Owner"), /*
* Signs * Signs
*/ */
OWNER_SIGN_LINE_1("$1ID: $1%id%", "Signs"), OWNER_SIGN_LINE_2("$1Owner:",
"Signs"), OWNER_SIGN_LINE_3("$2%plr%", "Signs"), OWNER_SIGN_LINE_4("$3Claimed", "Signs"), /* OWNER_SIGN_LINE_1("$1ID: $1%id%", "Signs"), OWNER_SIGN_LINE_2("$1Owner:", "Signs"),
OWNER_SIGN_LINE_3("$2%plr%", "Signs"), OWNER_SIGN_LINE_4("$3Claimed", "Signs"), /*
* Help * Help
*/ */
HELP_HEADER("$3&m---------&r $1Plot\u00B2 Help $3&m---------", "Help"), HELP_PAGE_HEADER( HELP_HEADER("$3&m---------&r $1Plot\u00B2 Help $3&m---------", "Help"), HELP_PAGE_HEADER(
"$1Category: $2%category%$2,$1 Page: $2%current%$3/$2%max%$2", "Help"), HELP_FOOTER( "$1Category: $2%category%$2,$1 Page: $2%current%$3/$2%max%$2", "Help"),
"$3&m---------&r $1Plot\u00B2 Help $3&m---------", "Help"),
HELP_FOOTER("$3&m---------&r $1Plot\u00B2 Help $3&m---------", "Help"),
HELP_INFO_ITEM("$1/plot help %category% $3- $2%category_desc%", "Help"), HELP_ITEM( HELP_INFO_ITEM("$1/plot help %category% $3- $2%category_desc%", "Help"), HELP_ITEM(
"$1%usage% [%alias%]&- $3- $2%desc%&-", "Help"), /* "$1%usage% [%alias%]&- $3- $2%desc%&-", "Help"), /*
* Direction * Direction
*/ */
DIRECTION("$1Current direction: %dir%", "Help"), /* DIRECTION("$1Current direction: %dir%", "Help"), /*
* Grant * Grant
*/ */
GRANTED_PLOTS("$1Result: $2%s $1grants left", "Grants"), GRANTED_PLOT( GRANTED_PLOTS("$1Result: $2%s $1grants left", "Grants"), GRANTED_PLOT(
"$1You granted %s0 plot to $2%s1", "Grants"), GRANTED_PLOT_FAILED("$1Grant failed: $2%s", "$1You granted %s0 plot to $2%s1", "Grants"),
"Grants"), /*
GRANTED_PLOT_FAILED("$1Grant failed: $2%s", "Grants"), /*
* Custom * Custom
*/ */
CUSTOM_STRING("-", "-"); CUSTOM_STRING("-", "-");
public static final HashMap<String, String> replacements = new HashMap<>(); public static final HashMap<String, String> replacements = new HashMap<>();
/** /**
@ -827,5 +1043,4 @@ public enum C {
} else { } else {
caller.sendMessage(msg); caller.sendMessage(msg);
} }
} }}
}

View File

@ -16,6 +16,7 @@ import java.net.URLConnection;
import java.nio.channels.Channels; import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel; import java.nio.channels.ReadableByteChannel;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream; import java.util.zip.GZIPOutputStream;
@ -441,6 +442,25 @@ public abstract class SchematicHandler {
return getSchematic(file); return getSchematic(file);
} }
/**
* Get an immutable collection containing all schematic names
*
* @return Immutable collection with schematic names
*/
public Collection<String> getShematicNames() {
final File parent = MainUtil.getFile(PlotSquared.get().IMP.getDirectory(), Settings.Paths.SCHEMATICS);
final List<String> names = new ArrayList<>();
if (parent.exists()) {
final String[] rawNames = parent.list((dir, name) -> name.endsWith(".schematic"));
if (rawNames != null) {
final List<String> transformed = Arrays.stream(rawNames).map(rawName -> rawName.substring(0, rawName.length() - 10))
.collect(Collectors.toList());
names.addAll(transformed);
}
}
return Collections.unmodifiableList(names);
}
/** /**
* Get a schematic * Get a schematic
* *