Skip to content

Commit

Permalink
Fix inventories when there are no NPCS
Browse files Browse the repository at this point in the history
mah bad
  • Loading branch information
mcmonkey4eva committed Jul 1, 2015
1 parent 3ec7c46 commit 46e023a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dInventory.java
Expand Up @@ -7,6 +7,7 @@
import net.aufdemrand.denizen.tags.BukkitTagContext;
import net.aufdemrand.denizen.utilities.Utilities;
import net.aufdemrand.denizen.utilities.debugging.dB;
import net.aufdemrand.denizen.utilities.depends.Depends;
import net.aufdemrand.denizen.utilities.nbt.ImprovedOfflinePlayer;
import net.aufdemrand.denizencore.objects.*;
import net.aufdemrand.denizencore.objects.aH.Argument;
Expand Down Expand Up @@ -1056,7 +1057,7 @@ public dInventory setSlots(int slot, ItemStack... items) {
}
inventory.setItem(slot + i, item);
}
if (dNPC.matches(idHolder)) { // TODO: Directly store holder
if (Depends.citizens != null && dNPC.matches(idHolder)) { // TODO: Directly store holder
dNPC.valueOf(idHolder).getInventoryTrait().setContents(inventory.getContents());
}
return this;
Expand Down

0 comments on commit 46e023a

Please sign in to comment.