Class PluginDisableCleanupListener

java.lang.Object
io.artificial.enchantments.internal.PluginDisableCleanupListener
All Implemented Interfaces:
org.bukkit.event.Listener

public final class PluginDisableCleanupListener extends Object implements org.bukkit.event.Listener
Cleans up event bus subscriptions when dependent plugins disable.
  • Constructor Details

    • PluginDisableCleanupListener

      public PluginDisableCleanupListener(@NotNull @NotNull EnchantmentEventBus eventBus)
      Creates a new cleanup listener for the shared enchantment event bus.
      Parameters:
      eventBus - event bus instance to clean when plugins disable
  • Method Details

    • onPluginDisable

      public void onPluginDisable(@NotNull @NotNull org.bukkit.event.server.PluginDisableEvent event)
      Removes all subscriptions owned by the plugin that just disabled.
      Parameters:
      event - the disable event emitted by Bukkit