summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_12.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-05-09 16:51:15 +0200
committerGitHub <noreply@github.com>2020-05-09 16:51:15 +0200
commite6634ed26c50e99f6ccd285235fe477cb4168b06 (patch)
treeb533a69db545835a886bcd8c5b05609b4c830d11 /src/Protocol/Protocol_1_12.cpp
parentUpgrade to C++17 [CI] (#4716) (diff)
downloadcuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar
cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.gz
cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.bz2
cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.lz
cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.xz
cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.zst
cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.zip
Diffstat (limited to 'src/Protocol/Protocol_1_12.cpp')
-rw-r--r--src/Protocol/Protocol_1_12.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp
index d2e7b2071..dba85435b 100644
--- a/src/Protocol/Protocol_1_12.cpp
+++ b/src/Protocol/Protocol_1_12.cpp
@@ -26,6 +26,7 @@ Implements the 1.12 protocol classes:
#include "../Server.h"
#include "../ClientHandle.h"
#include "../Bindings/PluginManager.h"
+#include "../JsonUtils.h"
@@ -361,9 +362,8 @@ void cProtocol_1_12::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
}
// Serialize the response into a packet:
- Json::FastWriter Writer;
cPacketizer Pkt(*this, pktStatusResponse);
- Pkt.WriteString(Writer.write(ResponseValue));
+ Pkt.WriteString(JsonUtils::WriteFastString(ResponseValue));
}
@@ -1220,9 +1220,8 @@ void cProtocol_1_12_1::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
}
// Serialize the response into a packet:
- Json::FastWriter Writer;
cPacketizer Pkt(*this, pktStatusResponse);
- Pkt.WriteString(Writer.write(ResponseValue));
+ Pkt.WriteString(JsonUtils::WriteFastString(ResponseValue));
}
@@ -1378,9 +1377,8 @@ void cProtocol_1_12_2::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
}
// Serialize the response into a packet:
- Json::FastWriter Writer;
cPacketizer Pkt(*this, pktStatusResponse);
- Pkt.WriteString(Writer.write(ResponseValue));
+ Pkt.WriteString(JsonUtils::WriteFastString(ResponseValue));
}