From c60a4d8d39a93ddb7aa5c24e373c9c964f0d640c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 24 Apr 2023 17:08:03 -0400 Subject: [PATCH] Bugfix for contract-less npc owners. --- src/engine/objects/NPC.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 9e09dd8a..383a8538 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -274,7 +274,10 @@ public class NPC extends AbstractCharacter { this.buildingLevel = (rs.getInt("npc_buildingLevel")); this.setParentZone(ZoneManager.getZoneByUUID(this.parentZoneID)); - this.nameOverride = rs.getString("npc_name") + " the " + this.getContract().getName(); + if (this.contract != null) + this.nameOverride = rs.getString("npc_name") + " the " + this.getContract().getName(); + else + this.nameOverride = rs.getString("npc_name"); }catch(Exception e){ Logger.error(e);