Fix fetching player report stats.

This commit is contained in:
Keir 2015-11-20 22:20:56 +00:00
parent ad16c59ab7
commit 435f2b643d

View File

@ -138,18 +138,10 @@ public class ReportManager {
public boolean canReport(Player player) public boolean canReport(Player player)
{ {
try { PlayerStats playerStats = _statsManager.Get(player.getName());
PlayerStats playerStats = _statsManager.getOfflinePlayerStats(player.getName());
long abusiveReportsCount = playerStats.getStat(ReportResult.ABUSIVE.getStatName()); long abusiveReportsCount = playerStats.getStat(ReportResult.ABUSIVE.getStatName());
return abusiveReportsCount < ABUSE_BAN_THRESHOLD; return abusiveReportsCount < ABUSE_BAN_THRESHOLD;
} }
catch (SQLException e)
{
player.sendMessage(C.cRed + "Internal error.");
e.printStackTrace();
return false;
}
}
private void incrementTotalStat(String reporter) private void incrementTotalStat(String reporter)
{ {