Interface IWPlugin


public interface IWPlugin
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Determine if your loading requirements are met.
    default String
    Set your plugin name.
    default void
    init(net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent event)
    Initialize your plugin here.
  • Method Details

    • init

      @OverrideOnly @AvailableSince("1.17.0") default void init(net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent event)
      Initialize your plugin here. This occurs during the FMLCommonSetupEvent, and the event instance is passed here.

      It is not required for you to have anything here. If your plugin does not need to initialize, there is no need to override.
    • getPluginName

      @AvailableSince("1.17.0") default String getPluginName()
      Set your plugin name. This should ideally be in the format of modid:pluginname to avoid naming clashes.
      Returns:
      a string containing the plugin name
    • areLoadingRequirementsMet

      @AvailableSince("1.17.0") default boolean areLoadingRequirementsMet()
      Determine if your loading requirements are met. For example, checking if a dependency is installed first. Do any of your requirement checks here. Returning false will prevent the plugin from initializing.
      Returns:
      a boolean determining if the plugin can initialize