From 933e8cbaed0491df2fe87cc6962a1d1f76bac2d6 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Tue, 8 Jan 2019 05:25:46 -0200 Subject: [PATCH] set auto-team to false on join packet --- .../protocols/protocol1_9to1_8/packets/PlayerPackets.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java index 6d901e74e..af823f1c7 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/PlayerPackets.java @@ -208,11 +208,13 @@ public class PlayerPackets { handler(new PacketHandler() { @Override public void handle(PacketWrapper wrapper) throws Exception { + EntityTracker entityTracker = wrapper.user().get(EntityTracker.class); if (Via.getConfig().isAutoTeam()) { - EntityTracker entityTracker = wrapper.user().get(EntityTracker.class); entityTracker.setAutoTeam(true); entityTracker.sendTeamPacket(true, false); entityTracker.setCurrentTeam("viaversion"); + } else { + entityTracker.setAutoTeam(false); } } });