mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-12-06 03:07:21 +00:00
[FIX] Added null check in Npcs.getNearest
This commit is contained in:
1 parent
1d286bd540
commit
b457abc9f4
1 file changed
+5
-3
@@ -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