From 148d6be2ce98f9469b8b266f1bd9ab7deb4e79dc Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 10 Apr 2022 18:55:45 +0200 Subject: [PATCH] Fix WingParticle Memory Leak --- src/de/steamwar/lobby/particle/decorator/WingParticle.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/de/steamwar/lobby/particle/decorator/WingParticle.java b/src/de/steamwar/lobby/particle/decorator/WingParticle.java index 8da6905..ea48404 100644 --- a/src/de/steamwar/lobby/particle/decorator/WingParticle.java +++ b/src/de/steamwar/lobby/particle/decorator/WingParticle.java @@ -19,10 +19,12 @@ package de.steamwar.lobby.particle.decorator; +import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.particle.BaseParticle; import de.steamwar.lobby.particle.ParticleData; import de.steamwar.lobby.particle.ParticleItem; import lombok.SneakyThrows; +import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -81,6 +83,8 @@ public class WingParticle implements BaseParticle, Listener { this.particle = particle; this.size = size; this.wingDesign = wingDesign; + + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin()); } @Override