diff --git a/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java
index 8562cda29..1c85463d9 100644
--- a/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java
+++ b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java
@@ -139,7 +139,7 @@ public final class FlagCommand extends Command {
TranslatableCaption.of("flag.flag_parse_error"),
Template.of("flag_name", flag.getName()),
Template.of("flag_value", e.getValue()),
- Templates.of(player, "error", e.getErrorMessage(), e.getTemplates())
+ Template.of("error", e.getErrorMessage().getComponent(player))
);
return false;
} catch (final Exception e) {
@@ -348,7 +348,7 @@ public final class FlagCommand extends Command {
TranslatableCaption.of("flag.flag_parse_error"),
Template.of("flag_name", plotFlag.getName()),
Template.of("flag_value", e.getValue()),
- Templates.of(player, "error", e.getErrorMessage(), e.getTemplates())
+ Template.of("error", e.getErrorMessage().getComponent(player))
);
return;
}
@@ -410,7 +410,7 @@ public final class FlagCommand extends Command {
TranslatableCaption.of("flag.flag_parse_error"),
Template.of("flag_name", plotFlag.getName()),
Template.of("flag_value", e.getValue()),
- Templates.of(player, "error", e.getErrorMessage(), e.getTemplates())
+ Template.of("error", e.getErrorMessage().getComponent(player))
);
return;
}
@@ -482,7 +482,7 @@ public final class FlagCommand extends Command {
TranslatableCaption.of("flag.flag_parse_error"),
Template.of("flag_name", flag.getName()),
Template.of("flag_value", e.getValue()),
- Templates.of(player, "error", e.getErrorMessage(), e.getTemplates())
+ Template.of("error", String.valueOf(e.getErrorMessage()))
);
return;
}
diff --git a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java
index eb7ff81d0..af5d2dc16 100644
--- a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java
+++ b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java
@@ -126,7 +126,7 @@ public class ComponentPresetManager {
"##wool",
0,
"",
- "Disco Floor",
+ "Disco Floor",
Arrays.asList("Spice up your plot floor"),
ItemTypes.YELLOW_WOOL
));
diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java
index a04619b39..63d78b263 100644
--- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java
+++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java
@@ -68,8 +68,7 @@ public abstract class LongFlag> extends NumberFlag
throw new FlagParseException(
this,
input,
- TranslatableCaption.of("invalid.not_a_number"),
- Template.of("value", input)
+ TranslatableCaption.of("flags.flag_error_long")
);
}
}
diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java
index 7008e859a..8129934b9 100644
--- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java
+++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java
@@ -26,7 +26,6 @@
package com.plotsquared.core.plot.flag.types;
import com.plotsquared.core.configuration.caption.Caption;
-import com.plotsquared.core.configuration.caption.Templates;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.plot.flag.FlagParseException;
import com.plotsquared.core.plot.flag.PlotFlag;
@@ -55,10 +54,7 @@ public abstract class NumberFlag, F extends Plo
public F parse(@NonNull String input) throws FlagParseException {
final N parsed = parseNumber(input);
if (parsed.compareTo(minimum) < 0 || parsed.compareTo(maximum) > 0) {
- throw new FlagParseException(this, input, TranslatableCaption.of("invalid.number_not_in_range"),
- Templates.of("min", minimum),
- Templates.of("max", maximum)
- );
+ throw new FlagParseException(this, input, TranslatableCaption.of("flags.flag_error_integer"));
}
return flagOf(parsed);
diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java
index 62b28b9aa..e2d15d3ef 100644
--- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java
+++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java
@@ -29,7 +29,6 @@ import com.plotsquared.core.configuration.caption.Caption;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.plot.flag.FlagParseException;
import com.plotsquared.core.plot.flag.PlotFlag;
-import net.kyori.adventure.text.minimessage.Template;
import org.checkerframework.checker.nullness.qual.NonNull;
public abstract class TimedFlag, F>>
@@ -52,16 +51,14 @@ public abstract class TimedFlag, F>>
throw new FlagParseException(
this,
input,
- TranslatableCaption.of("invalid.not_a_number"),
- Template.of("value", split[0])
+ TranslatableCaption.of("flags.flag_error_integer")
);
}
if (interval < 1) {
throw new FlagParseException(
this,
input,
- TranslatableCaption.of("invalid.number_not_positive"),
- Template.of("value", split[0])
+ TranslatableCaption.of("flags.flag_error_integer")
);
}
if (split.length == 1) {
diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json
index cf2581b50..4033868b1 100644
--- a/Core/src/main/resources/lang/messages_en.json
+++ b/Core/src/main/resources/lang/messages_en.json
@@ -203,8 +203,8 @@
"invalid.not_valid_plot_id": "That's not a valid plot ID.",
"invalid.found_no_plots": "Found no plots with your search query.",
"invalid.number_not_in_range": "That's not a valid number within the range: (, )",
- "invalid.number_not_positive": "That's not a positive number: ",
- "invalid.not_a_number": " is not a valid number.",
+ "invalid.number_not_positive": "That's not a positive number: ",
+ "invalid.not_a_number": " is not a valid number.",
"condense.invalid_area": "Invalid area.",
"condense.task_already_started": "Task already started.",
"condense.invalid_radius": "Invalid radius.",
@@ -572,20 +572,14 @@
"flags.flag_description_keep_inventory": "Prevents players from dropping their items when they die inside of the plot.",
"flags.flag_description_prevent_creative_copy": "Prevents people from copying item NBT data in the plot unless they're added as members.",
"flags.flag_description_leaf_decay": "Set to `false` to prevent leaves from decaying.",
- "flags.flag_error_boolean": "Flag value must be a boolean (true | false).",
- "flags.flag_error_enum": "Must be one of: ",
- "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_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_invalid_block": "The provided value is not a valid block or block category.",
- "flags.flag_error_double": "Flag value must be a decimal 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.flag_error_music": "Flag value must be a valid music disc ID.",
+ "flags.flag_error_boolean": "Flag value must be a boolean (true | false).",
+ "flags.flag_error_enum": "Must be one of: ",
+ "flags.flag_error_integer": "Flag value must be a whole positive number.",
+ "flags.flag_error_keep": "Flag value must be a timestamp or a boolean.",
+ "flags.flag_error_long": "Flag value must be a whole positive number (large numbers allowed).",
+ "flags.flag_error_invalid_block": "The provided value is not a valid block or block category.",
+ "flags.flag_error_double": "Flag value must be a decimal number.",
+ "flags.flag_error_music": "Flag value must be a valid music disc ID.",
"flags.area_flags": "Area flags: ",
"flags.road_flags": "Road flags: ",
"commands.description.add": "Allow a user to build in a plot while the plot owner is online.",