Skip to content

Commit

Permalink
Handle equipment better
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 5, 2015
1 parent eed3fb5 commit 4a572f0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Expand Up @@ -620,7 +620,15 @@ public String getName() {
*/

public dList getEquipment() {
return getInventory().getEquipment();
if (isCitizensNPC() || isPlayer()) {
return getInventory().getEquipment();
}
ItemStack[] equipment = getLivingEntity().getEquipment().getArmorContents();
dList equipmentList = new dList();
for (ItemStack item : equipment) {
equipmentList.add(new dItem(item).identify());
}
return equipmentList;
}

/**
Expand Down

0 comments on commit 4a572f0

Please sign in to comment.