diff --git a/src/lib/serverPlugins/tick.js b/src/lib/serverPlugins/tick.js index a6ea6d4..6d50fbb 100644 --- a/src/lib/serverPlugins/tick.js +++ b/src/lib/serverPlugins/tick.js @@ -11,7 +11,7 @@ function inject(serv, settings) { function setTickInterval(ticksPerSecond) { var serv = this; - stopTickInterval(); + serv.stopTickInterval(); serv.tickInterval = setInterval(function() { serv.tickCount++; @@ -20,6 +20,6 @@ function setTickInterval(ticksPerSecond) { } function stopTickInterval() { - if (serv.tickInterval) clearInterval(serv.tickInterval); - serv.tickInterval = null; + if (this.tickInterval) clearInterval(serv.tickInterval); + this.tickInterval = null; } \ No newline at end of file