TCheckpoint
This commit is contained in:
parent
aa415c443e
commit
00faf1f2fd
16 changed files with 38 additions and 7 deletions
|
|
@ -88,10 +88,10 @@ public class ServerStats {
|
|||
return;
|
||||
}
|
||||
if (type == Integer.class) {
|
||||
int currentStat = stats.getOrDefault(stat, 0) instanceof Number ? ((Number) stats.get(stat)).intValue() : 0;
|
||||
int currentStat = stats.get(stat) instanceof Number ? ((Number) stats.get(stat)).intValue() : 0;
|
||||
stats.put(stat, currentStat + amount);
|
||||
} else if (type == Double.class) {
|
||||
double currentStat = stats.getOrDefault(stat, 0.0) instanceof Number ? ((Number) stats.get(stat)).doubleValue() : 0.0;
|
||||
double currentStat = stats.get(stat) instanceof Number ? ((Number) stats.get(stat)).doubleValue() : 0.0;
|
||||
stats.put(stat, currentStat + amount);
|
||||
}
|
||||
saveStats();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue