Skip to content

Commit 565bcb5

Browse files
committed
Fixed NPE with getRecentNpcKills
1 parent 26087a9 commit 565bcb5

File tree

1 file changed

+1
-1
lines changed
  • server/src/com/openrsc/server/model/entity/player

1 file changed

+1
-1
lines changed

server/src/com/openrsc/server/model/entity/player/Player.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,7 @@ public int getNpcKills() {
30743074

30753075
public int getRecentNpcKills() {
30763076
if (getLastNpcKilledId() == -1) return 0;
3077-
return getKillCache().get(getLastNpcKilledId());
3077+
return getKillCache().getOrDefault(getLastNpcKilledId(), 0);
30783078
}
30793079

30803080
public int getExpShared() {

0 commit comments

Comments
 (0)