From a25511c8496fa92b3bde9b3df07b32a87d9e3285 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Nov 2019 19:22:54 +0100 Subject: [PATCH] Add custom translations for special flags --- .../intellectualsites/plotsquared/plot/config/Captions.java | 4 +++- .../github/intellectualsites/plotsquared/plot/flag/Flags.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 a27711e2b..68783e02e 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 @@ -555,11 +555,13 @@ public enum Captions { FLAG_ERROR_INTEGER("Flag value must be a whole number", "Flags"), FLAG_ERROR_INTEGER_LIST("Flag value must be an integer list", "Flags"), FLAG_ERROR_INTERVAL("Value(s) must be numeric. /plot set flag [amount]", "Flags"), + FLAG_ERROR_KEEP("Flag value must be a timestamp or a boolean", "Flags"), FLAG_ERROR_LONG("Flag value must be a whole number (large numbers allowed)", "Flags"), FLAG_ERROR_PLOTBLOCKLIST("Flag value must be a block list", "Flags"), - FLAG_ERROR_WEATHER("Flag must be a weather: 'rain' or 'sun'", "Flags"), + FLAG_ERROR_PRICE("Flag value must be a positive number.", "Flags"), FLAG_ERROR_STRING("Flag value must be alphanumeric. Some special characters are allowed.", "Flags"), FLAG_ERROR_STRINGLIST("Flag value must be a string list", "Flags"), + FLAG_ERROR_WEATHER("Flag must be a weather: 'rain' or 'sun'", "Flags"), // // TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"), diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java index b21d6fb25..07e71a348 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java @@ -40,7 +40,7 @@ public final class Flags { } @Override public String getValueDescription() { - return "Flag value must be a positive number."; + return Captions.FLAG_ERROR_PRICE.getTranslated(); } }; public static final BooleanFlag EXPLOSION = new BooleanFlag("explosion"); @@ -114,7 +114,7 @@ public final class Flags { } @Override public String getValueDescription() { - return "Flag value must be a timestamp or a boolean"; + return Captions.FLAG_ERROR_KEEP.getTranslated(); } }; public static final TeleportDenyFlag DENY_TELEPORT = new TeleportDenyFlag("deny-teleport");