Class PluginHandler

java.lang.Object
tech.anonymoushacker1279.immersiveweapons.api.PluginHandler

public class PluginHandler extends Object
  • Constructor Details

    • PluginHandler

      public PluginHandler()
  • Method Details

    • initializePlugins

      @Internal public static void initializePlugins(net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent event)
      Initialize plugins. This should NOT be called in your own code, IW will automatically initialize plugins during its common setup stage.
      Parameters:
      event - the FMLCommonSetupEvent instance
    • registerPlugin

      @AvailableSince("1.17.0") public static void registerPlugin(IWPlugin plugin)
      Register your plugin here from your mod's constructor.

      Registration will fail in either of the two conditions:
      - a plugin already exists with the name of your plugin
      - the initialization stage has already passed
      Parameters:
      plugin - the IWPlugin instance you are registering
    • isPluginRegistered

      @AvailableSince("1.20.0") public static boolean isPluginRegistered(String name)
      Check if a plugin has been registered. Note, a plugin may be registered but not active. If you are checking if a plugin is active, use isPluginActive(String) instead.
      Parameters:
      name - the name of the plugin
      Returns:
      true if the plugin has been registered, false otherwise
    • isPluginActive

      @AvailableSince("1.23.0") public static boolean isPluginActive(String name)
      Check if a plugin is active.
      Parameters:
      name - the name of the plugin
      Returns:
      true if the plugin is active, false otherwise