metronome: Reset plugin state on shutDown (#11667)

This prevents the tick counter from "rolling over" when toggling the
plugin, ensuring it starts its counter from 0 every time.
This commit is contained in:
Brandon Austin
2020-06-02 23:44:56 -07:00
committed by GitHub
parent 16a555a86e
commit 05a717824f

View File

@@ -58,6 +58,13 @@ public class MetronomePlugin extends Plugin
return configManager.getConfig(MetronomePluginConfiguration.class);
}
@Override
protected void shutDown()
{
tickCounter = 0;
shouldTock = false;
}
@Subscribe
public void onGameTick(GameTick tick)
{