aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrakenied <Krakenied1@gmail.com>2024-02-20 09:39:38 +0100
committerLeonardo Bishop <13875753+LMBishop@users.noreply.github.com>2024-02-22 16:35:06 +0000
commit03be381bc8a7ada87c5f1d1114861914e32432ce (patch)
tree43c7ed8e757afb82c456981af4b57254e7c17426
parent46501dd3efbbbfe7ce99740a082bf6f326713a7f (diff)
Fix config validators descriptions
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/TaskUtils.java5
-rw-r--r--common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblemDescriptions.java12
2 files changed, 12 insertions, 5 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/TaskUtils.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/TaskUtils.java
index fb284045..c6508319 100644
--- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/TaskUtils.java
+++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/TaskUtils.java
@@ -25,6 +25,7 @@ import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
+import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.Colorable;
import org.jetbrains.annotations.NotNull;
@@ -774,8 +775,8 @@ public class TaskUtils {
EntityType.valueOf(entity);
} catch (IllegalArgumentException ex) {
problems.add(new ConfigProblem(ConfigProblem.ConfigProblemType.WARNING,
- ConfigProblemDescriptions.UNKNOWN_MATERIAL.getDescription(entity),
- ConfigProblemDescriptions.UNKNOWN_MATERIAL.getExtendedDescription(entity),
+ ConfigProblemDescriptions.UNKNOWN_ENTITY_TYPE.getDescription(entity),
+ ConfigProblemDescriptions.UNKNOWN_ENTITY_TYPE.getExtendedDescription(entity),
path));
}
}
diff --git a/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblemDescriptions.java b/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblemDescriptions.java
index dc53ec22..68298bba 100644
--- a/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblemDescriptions.java
+++ b/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblemDescriptions.java
@@ -65,21 +65,27 @@ public enum ConfigProblemDescriptions {
"Dye color '%s' does not exist on the server.<br>" +
"Please refer to the wiki for a list of javadocs<br>" +
"corresponding to your server version. Alternatively,<br>" +
- "you can find the material list by searching for your<br>" +
+ "you can find the dye color list by searching for your<br>" +
"server version + 'DyeColor ENUM'."),
UNKNOWN_ENCHANTMENT("Enchantment '%s' does not exist",
"Enchantment '%s' does not exist on the server.<br>" +
"Please refer to the wiki for a list of javadocs<br>" +
"corresponding to your server version. Alternatively,<br>" +
- "you can find the material list by searching for your<br>" +
+ "you can find the enchantment list by searching for your<br>" +
"server version + 'Enchantment javadoc'."
),
UNKNOWN_ENTITY_TYPE("Entity type '%s' does not exist",
"Entity type '%s' does not exist on the server.<br>" +
"Please refer to the wiki for a list of javadocs<br>" +
"corresponding to your server version. Alternatively,<br>" +
- "you can find the material list by searching for your<br>" +
+ "you can find the entity type list by searching for your<br>" +
"server version + 'EntityType ENUM'."),
+ UNKNOWN_SPAWN_REASON("Spawn reason '%s' does not exist",
+ "Spawn reason '%s' does not exist on the server.<br>" +
+ "Please refer to the wiki for a list of javadocs<br>" +
+ "corresponding to your server version. Alternatively,<br>" +
+ "you can find the spawn reason list by searching for your<br>" +
+ "server version + 'SpawnReason ENUM'."),
TASK_MALFORMED_NOT_SECTION("Task '%s' is not a configuration section",
"Task '%s' is not properly formatted as a<br>" +
"configuration section. Please review the wiki<br>" +