Fix fetching player report stats.
This commit is contained in:
parent
ad16c59ab7
commit
435f2b643d
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user