use of com.floweytf.utils.stdstreams.StandardByteWriter in project scripted-quests by TeamMonumenta.
the class ClientChatProtocol method sendJson.
private static void sendJson(Player player, JsonObject object) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
StandardByteWriter out = new StandardByteWriter(stream);
try {
out.write(GSON.toJson(object));
player.sendPluginMessage(mPlugin, Constants.API_CHANNEL_ID, stream.toByteArray());
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations