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:
@@ -58,6 +58,13 @@ public class MetronomePlugin extends Plugin
|
|||||||
return configManager.getConfig(MetronomePluginConfiguration.class);
|
return configManager.getConfig(MetronomePluginConfiguration.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void shutDown()
|
||||||
|
{
|
||||||
|
tickCounter = 0;
|
||||||
|
shouldTock = false;
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameTick(GameTick tick)
|
public void onGameTick(GameTick tick)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user