From 8d1b95060aefef9c27b5f000c6084d0266781a8d Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Fri, 21 Aug 2020 01:07:24 -0400 Subject: [PATCH] Output json object as text for debug --- server/plugin/entities/entities.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/plugin/entities/entities.go b/server/plugin/entities/entities.go index f27aacc..3434166 100644 --- a/server/plugin/entities/entities.go +++ b/server/plugin/entities/entities.go @@ -24,6 +24,9 @@ type PlayerPosResponse struct { func (p *PlayerEntity) ParsePositionRequest(data []byte) (PlayerPosResponse, error) { var response PlayerPosResponse err := json.Unmarshal(data, &response) + if err != nil { + fmt.Printf("Failed to parse: %s", string(data[:])) + } return response, err }