From 1abb7b4b874037df77c568979e04c337a918054f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Fern=C3=A1ndez?= Date: Thu, 24 Nov 2022 14:02:05 +0100 Subject: [PATCH] fix: incorrect accshield auth serialization --- .../io/v4guard/plugin/core/accounts/AccountShieldManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/io/v4guard/plugin/core/accounts/AccountShieldManager.java b/src/main/java/io/v4guard/plugin/core/accounts/AccountShieldManager.java index 369a653..febe6a4 100644 --- a/src/main/java/io/v4guard/plugin/core/accounts/AccountShieldManager.java +++ b/src/main/java/io/v4guard/plugin/core/accounts/AccountShieldManager.java @@ -23,8 +23,7 @@ public void sendSocketMessage(Authentication auth){ boolean shieldEnabled = (boolean) shieldSettings.getOrDefault("accshield", false); if(!shieldEnabled) return; - Document finalDocument = new Document("username", auth.getUsername()) - .append("type", auth.getAuthType().toString()); + Document finalDocument = auth.serialize(); v4GuardCore.getInstance().getBackendConnector().getSocket().emit("accshield:login", finalDocument.toJson()); } }