Accurately report game TPS

This commit is contained in:
cnr 2016-08-17 23:38:08 -04:00
parent 405f67f8b2
commit 999237fe69
2 changed files with 0 additions and 25 deletions

View File

@ -37,8 +37,6 @@ public class LagMeter extends MiniPlugin
private boolean _timingsPasted;
private long _timingsStarted;
private boolean _fakeTps = false;
private HashSet<Player> _monitoring = new HashSet<Player>();
public LagMeter(JavaPlugin plugin, CoreClientManager clientManager)
@ -122,10 +120,6 @@ public class LagMeter extends MiniPlugin
public double getTicksPerSecond()
{
if (_fakeTps)
{
return 20.0;
}
return _ticksPerSecond;
}
@ -170,10 +164,4 @@ public class LagMeter extends MiniPlugin
player.sendMessage(F.main(getName(), ChatColor.GRAY + "Free-------" + ChatColor.YELLOW + (Runtime.getRuntime().freeMemory() / 1048576) + "MB"));
player.sendMessage(F.main(getName(), ChatColor.GRAY + "Max--------" + ChatColor.YELLOW + (Runtime.getRuntime().maxMemory() / 1048576)) + "MB");
}
// I'm so sorry. Blame ServerMonitor for being so strict
public void setFakeTps(boolean fakeTps)
{
this._fakeTps = fakeTps;
}
}

View File

@ -715,19 +715,6 @@ public class UHC extends TeamGame implements NCPHook
}
}
@EventHandler
public void toggleFakeTps(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Dead)
{
Managers.get(LagMeter.class).setFakeTps(true);
}
else
{
Managers.get(LagMeter.class).setFakeTps(false);
}
}
@EventHandler
public void generateWorld(GameStateChangeEvent event)
{