From 4dd0cb03a38faa8dac35cfae32d37fa9806e6209 Mon Sep 17 00:00:00 2001 From: fullwall Date: Fri, 20 Apr 2012 23:19:15 +0800 Subject: [PATCH] Default type to player if not found --- src/main/java/net/citizensnpcs/Citizens.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/citizensnpcs/Citizens.java b/src/main/java/net/citizensnpcs/Citizens.java index cd48ca4df..742eb24ec 100644 --- a/src/main/java/net/citizensnpcs/Citizens.java +++ b/src/main/java/net/citizensnpcs/Citizens.java @@ -280,7 +280,7 @@ public class Citizens extends JavaPlugin { Messaging.log("Could not find a name for the NPC with ID '" + id + "'."); continue; } - String unparsedEntityType = key.getString("traits.type"); + String unparsedEntityType = key.getString("traits.type", "PLAYER"); EntityType type = EntityType.fromName(unparsedEntityType); if (type == null) { try {