diff --git a/src/main/java/com/comandante/creeper/npc/NpcBuilder.java b/src/main/java/com/comandante/creeper/npc/NpcBuilder.java index c2af8eccc6dbc4b20e399d352c1f2382cd43aedc..46e98cbaa59166ec94c7ee89e1c109bee02e6c5e 100644 --- a/src/main/java/com/comandante/creeper/npc/NpcBuilder.java +++ b/src/main/java/com/comandante/creeper/npc/NpcBuilder.java @@ -147,8 +147,10 @@ public class NpcBuilder { public Npc createNpc() { checkNotNull(gameManager); - if (loot.getLootGoldMin() > loot.getLootGoldMax()) { - throw new RuntimeException("Invalid loot configuration."); + if (loot != null ) { + if (loot.getLootGoldMin() > loot.getLootGoldMax()) { + throw new RuntimeException("Invalid loot configuration."); + } } return new Npc(gameManager, name, colorName, lastPhraseTimestamp, stats, dieMessage, temperament, roamAreas, validTriggers, loot, spawnRules, attackMessages, criticalAttackMessages, battleMessages, idleMessages); }