Class ConfigLoadedEvent

java.lang.Object
net.neoforged.bus.api.Event
org.moddingx.libx.event.ConfigLoadedEvent

public class ConfigLoadedEvent extends Event
Fired whenever a LibX config is loaded. Is fired on both client and server. The event is not cancelable.
  • Constructor Details

  • Method Details

    • getConfigId

      public net.minecraft.resources.ResourceLocation getConfigId()
      Gets the id of the config that was loaded.
    • getConfigClass

      public Class<?> getConfigClass()
      Gets the class of the config that was loaded.
    • getReason

      public ConfigLoadedEvent.LoadReason getReason()
      Gets the reason why the config was loaded
    • isClientConfig

      public boolean isClientConfig()
      Gets whether the config is a client config.
    • getConfigPath

      public Path getConfigPath()
      Gets the path where the config is stored by default.
    • getCurrentPath

      @Nullable public Path getCurrentPath()
      Gets the path where the config is loaded from for this event. For example, configs can be loaded per world. In that case currentPath will be the path from the world and configPath will be the default path for the config which might still be used for values not present in the world-specific config. The value is null when the current config is loaded from a non-file location (for example on shadowing). It can also be the same as configPath when the config is loaded from the default path.