Skip to content

Commit

Permalink
Add proper disabling and enabling handling
Browse files Browse the repository at this point in the history
  • Loading branch information
snoh666 committed May 10, 2021
1 parent e600a7c commit 22e1d9f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/me/snoh666/manhunt/InitCommand.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package me.snoh666.manhunt;

import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public class InitCommand extends JavaPlugin {

private final BukkitRunnable CompassTracker = new CompassTracker(this);

@Override
public void onEnable() {
new CompassTracker(this).runTaskTimer(this, 0L, 20L);
this.CompassTracker.runTaskTimer(this, 0L, 20L);
}

@Override
public void onDisable() {}
public void onDisable() {
this.CompassTracker.cancel();
}
}

0 comments on commit 22e1d9f

Please # to comment.