diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index 272d09056..a7835f8db 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -698,11 +698,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain } } if (Settings.UUID.OFFLINE) { - PlotSquared.log(Captions.PREFIX + " &6" + getPluginName() + PlotSquared.log(Captions.PREFIX + "&6" + getPluginName() + " is using Offline Mode UUIDs either because of user preference, or because you are using an old version of " + "Bukkit"); } else { - PlotSquared.log(Captions.PREFIX + "" + getPluginName() + " is using online UUIDs"); + PlotSquared.log(Captions.PREFIX + "&6" + getPluginName() + " is using online UUIDs"); } if (Settings.UUID.USE_SQLUUIDHANDLER) { return new SQLUUIDHandler(wrapper); 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 c319303b6..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 @@ -548,7 +548,21 @@ public enum Captions { FLAG_CATEGORY_BOOLEAN("Boolean Flags", "Flags"), FLAG_CATEGORY_MIXED("Mixed Value Flags", "Flags"), // - + // + FLAG_ERROR_BOOLEAN("Flag value must be a boolean (true|false)", "Flags"), + FLAG_ERROR_ENUM("Must be one of: %s", "Flags"), + FLAG_ERROR_GAMEMODE("Flag value must be a gamemode: 'survival', 'creative', 'adventure' or 'spectator.", "Flags"), + 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_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"), WAS_NOT_ADDED("$2That player was not trusted on this plot", "Trusted"), diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java index 841df766c..692c0b501 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java @@ -31,7 +31,7 @@ public class BooleanFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a boolean (true|false)"; + return Captions.FLAG_ERROR_BOOLEAN.getTranslated(); } public boolean isTrue(Plot plot) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java index 8cc665471..ab2c86c45 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java @@ -22,6 +22,6 @@ public class DoubleFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a number."; + return Captions.FLAG_ERROR_BOOLEAN.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java index 88119bbaa..06936d4df 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java @@ -28,6 +28,6 @@ public class EnumFlag extends Flag { } @Override public String getValueDescription() { - return "Must be one of: " + StringMan.getString(values); + return Captions.FLAG_ERROR_ENUM.getTranslated() + StringMan.getString(values); } } 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"); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java index 26510b35b..023bf804a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java @@ -37,6 +37,6 @@ public class GameModeFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a gamemode: 'survival', 'creative', 'adventure' or 'spectator'"; + return Captions.FLAG_ERROR_GAMEMODE.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java index ced532cd1..8b527c46a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java @@ -10,7 +10,7 @@ public class IntegerFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a whole number"; + return Captions.FLAG_ERROR_INTEGER.getTranslated(); } @Override public String valueToString(Object value) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java index 1f24cb4a3..e9162000b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java @@ -27,6 +27,6 @@ public class IntegerListFlag extends ListFlag> { } @Override public String getValueDescription() { - return "Flag value must be an integer list"; + return Captions.FLAG_ERROR_INTEGER_LIST.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java index 0468c59b2..7b6b64d47 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java @@ -40,7 +40,7 @@ public class IntervalFlag extends Flag { } @Override public String getValueDescription() { - return "Value(s) must be numeric. /plot set flag [amount]"; + return Captions.FLAG_ERROR_INTERVAL.getTranslated(); } @EqualsAndHashCode @RequiredArgsConstructor @Getter public static final class Interval { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java index 8d57e8865..1d8846701 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java @@ -21,6 +21,6 @@ public class LongFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a whole number (large numbers allowed)"; + return Captions.FLAG_ERROR_LONG.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java index 93bd8c56f..1abaf32b0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java @@ -29,6 +29,6 @@ public class PlotBlockListFlag extends ListFlag> { } @Override public String getValueDescription() { - return "Flag value must be a block list"; + return Captions.FLAG_ERROR_PLOTBLOCKLIST.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java index 43544748f..1893d5370 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java @@ -31,6 +31,6 @@ public class PlotWeatherFlag extends Flag { } @Override public String getValueDescription() { - return "Flag must be a weather: 'rain' or 'sun'"; + return Captions.FLAG_ERROR_WEATHER.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java index 6438ec938..779f47e0d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java @@ -18,6 +18,6 @@ public class StringFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be alphanumeric. Some special characters are allowed."; + return Captions.FLAG_ERROR_STRING.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java index a1e28aa3d..eb76ec8c1 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java @@ -22,6 +22,6 @@ public class StringListFlag extends ListFlag> { } @Override public String getValueDescription() { - return "Flag value must be a string list"; + return Captions.FLAG_ERROR_STRINGLIST.getTranslated(); } }