fix: spam on setblock place block core (memory leak, i called ListenerManager.addListener(this)` every time the player joins)

This commit is contained in:
Chayapak Supasakul 2025-06-16 19:53:51 +07:00
parent acfa11e74b
commit 514912ba2a
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA

View file

@ -58,6 +58,7 @@ public class CommandCore implements Listener {
public CommandCore (final MinecraftClient client) {
this.client = client;
reloadRelativeArea();
ListenerManager.addListener(this);
}
public void init () {
@ -76,8 +77,6 @@ public class CommandCore implements Listener {
if (client.player == null) return;
move(client.player.getPos());
ListenerManager.addListener(this);
}
private void tick () {