Skip to content

Commit

Permalink
Deregister all listeners when deactivating to avoid multiple registra…
Browse files Browse the repository at this point in the history
…tions due to reloading the plugin
  • Loading branch information
DevCyntrix committed Aug 7, 2024
1 parent 08bf9ea commit ad02f7b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
Expand Down Expand Up @@ -202,6 +203,8 @@ public void onDisable() {

if (this.audiences != null)
this.audiences.close();

HandlerList.unregisterAll(this);
}

@Override
Expand Down

0 comments on commit ad02f7b

Please sign in to comment.