Class AdminSchoolValidator

java.lang.Object
johnsmith.enchantingoverhauled.server.AdminSchoolValidator

public final class AdminSchoolValidator extends Object
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
    Modifier and Type
    Class
    Description
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(net.minecraft.core.RegistryAccess registryAccess)
    Scans the active Enchantment registry and builds a report of any unassigned (Aberrant) or multi-assigned enchantments.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • evaluate

      public static AdminSchoolValidator.ValidationReport evaluate(net.minecraft.core.RegistryAccess registryAccess)
      Scans the active Enchantment registry 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.