From ff3442d9ad6345bfc08972b0d546d08477ff9df7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 28 May 2023 14:02:05 -0500 Subject: [PATCH] aiinfo command null check --- src/engine/devcmd/cmds/aiInfoCmd.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/devcmd/cmds/aiInfoCmd.java b/src/engine/devcmd/cmds/aiInfoCmd.java index c34dc84e..5987e0b1 100644 --- a/src/engine/devcmd/cmds/aiInfoCmd.java +++ b/src/engine/devcmd/cmds/aiInfoCmd.java @@ -102,7 +102,10 @@ public class aiInfoCmd extends AbstractDevCmd { for(Map.Entry entry : mob.playerAgroMap.entrySet()){ output += "Player ID: " + entry.getKey() + " Is Safemode: " + entry.getValue() + newline; } - output += "Current Target: " + mob.getCombatTarget().getName() + newline; + if(mob.getCombatTarget() != null) + output += "Current Target: " + mob.getCombatTarget().getName() + newline; + else + output += "Current Target: NULL" + newline; } throwbackInfo(pc, output); }