Default type to player if not found

This commit is contained in:
fullwall 2012-04-20 23:19:15 +08:00
parent 6d5b73a2dd
commit 4dd0cb03a3

View File

@ -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 {