mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-14 20:21:45 +01:00
Fixed [object Object] showing when Kill has unknown victim uuid
Improper use of Optional in Map#put Affects issues - Close #1675
This commit is contained in:
parent
47633cad37
commit
5401aef681
@ -288,8 +288,8 @@ public class SessionsMutator {
|
|||||||
kill -> {
|
kill -> {
|
||||||
Map<String, Object> killMap = new HashMap<>();
|
Map<String, Object> killMap = new HashMap<>();
|
||||||
killMap.put("date", formatters.secondLong().apply(kill.getDate()));
|
killMap.put("date", formatters.secondLong().apply(kill.getDate()));
|
||||||
killMap.put("victim", kill.getVictimName());
|
killMap.put("victim", kill.getVictimName().orElse(kill.getVictim().toString()));
|
||||||
killMap.put("killer", sessionMap.get("player_name"));
|
killMap.put("killer", playerName);
|
||||||
killMap.put("weapon", kill.getWeapon());
|
killMap.put("weapon", kill.getWeapon());
|
||||||
return killMap;
|
return killMap;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user