Class PluginDisableCleanupListener
java.lang.Object
io.artificial.enchantments.internal.PluginDisableCleanupListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Cleans up event bus subscriptions when dependent plugins disable.
-
Constructor Summary
ConstructorsConstructorDescriptionPluginDisableCleanupListener(@NotNull EnchantmentEventBus eventBus) Creates a new cleanup listener for the shared enchantment event bus. -
Method Summary
Modifier and TypeMethodDescriptionvoidonPluginDisable(@NotNull org.bukkit.event.server.PluginDisableEvent event) Removes all subscriptions owned by the plugin that just disabled.
-
Constructor Details
-
PluginDisableCleanupListener
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
-