mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-03 00:38:00 +00:00
[FIX] Added null check in Npcs.getNearest
This commit is contained in:
@@ -119,9 +119,11 @@ public class Npcs {
|
||||
|
||||
@Override
|
||||
public boolean accept(Npc npc) {
|
||||
for (final int id : ids) {
|
||||
if (id == npc.getDef().getId()) {
|
||||
return true;
|
||||
if (npc.getDef() != null){
|
||||
for (final int id : ids) {
|
||||
if (id == npc.getDef().getId()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user