Class AdminSchoolValidator
java.lang.Object
johnsmith.enchantingoverhauled.server.AdminSchoolValidator
Validates the
Enchantment registry against the 9 Schools of Magic
tags
on server startup, datapack reload, and when an operator joins the server.
Alerts operators (permission level ≥ 2) if any enchantments resolve to
ABERRATION
(unassigned) or violate the single-school rule by belonging to multiple
school tags.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionevaluate(net.minecraft.core.RegistryAccess registryAccess) Scans the activeEnchantmentregistry and builds a report of any unassigned (Aberrant) or multi-assigned enchantments.static voidvalidateAndAlert(net.minecraft.server.MinecraftServer server) Runs validation on server start or datapack reload, logging warnings to the server console and notifying all currently connected operators.static voidvalidateAndAlertPlayer(net.minecraft.server.level.ServerPlayer player) Checks if the joining player is an operator (permission level ≥ 2) and sends them the formatted chat alert if any datapack school assignment issues exist.
-
Method Details
-
evaluate
public static AdminSchoolValidator.ValidationReport evaluate(net.minecraft.core.RegistryAccess registryAccess) Scans the activeEnchantmentregistry and builds a report of any unassigned (Aberrant) or multi-assigned enchantments. -
validateAndAlert
public static void validateAndAlert(net.minecraft.server.MinecraftServer server) Runs validation on server start or datapack reload, logging warnings to the server console and notifying all currently connected operators. -
validateAndAlertPlayer
public static void validateAndAlertPlayer(net.minecraft.server.level.ServerPlayer player) Checks if the joining player is an operator (permission level ≥ 2) and sends them the formatted chat alert if any datapack school assignment issues exist.
-