From 06cc766986c9cb1908694ab33b8e750b6b16bfa1 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Mon, 13 Apr 2020 20:07:56 +0200 Subject: [PATCH] check bones owner's fields fixes #72 --- mapobject/bones.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mapobject/bones.go b/mapobject/bones.go index 232d452..aec5012 100644 --- a/mapobject/bones.go +++ b/mapobject/bones.go @@ -20,7 +20,15 @@ func (this *BonesBlock) onMapObject(x, y, z int, block *mapblockparser.MapBlock) o := mapobjectdb.NewMapObject(block.Pos, x, y, z, "bones") o.Attributes["time"] = md["time"] - o.Attributes["owner"] = md["owner"] + + if _, ok := md["owner"]; ok { + o.Attributes["owner"] = md["owner"] + } else if _, ok := md["_owner"]; ok { + o.Attributes["owner"] = md["_owner"] + } else { + o.Attributes["owner"] = "unknown" + } + o.Attributes["info"] = md["infotext"] itemCount := 0