Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
GenerelSchwerz committed Sep 9, 2024
1 parent 73e8a7d commit ad0a3e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class AutoJumper extends (EventEmitter as { new (): AutoJumperEmitter })
}

public set enabled(enable: boolean) {
if (enable === this._enabled) return;
if (enable) this.bot.on("physicsTick", this.jumpListener);
else this.bot.off("physicsTick", this.jumpListener);

Expand Down

0 comments on commit ad0a3e7

Please sign in to comment.