set auto-team to false on join packet

This commit is contained in:
creeper123123321 2019-01-08 05:25:46 -02:00
parent daac2baf8e
commit 933e8cbaed
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -208,11 +208,13 @@ public class PlayerPackets {
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
if (Via.getConfig().isAutoTeam()) {
EntityTracker entityTracker = wrapper.user().get(EntityTracker.class);
if (Via.getConfig().isAutoTeam()) {
entityTracker.setAutoTeam(true);
entityTracker.sendTeamPacket(true, false);
entityTracker.setCurrentTeam("viaversion");
} else {
entityTracker.setAutoTeam(false);
}
}
});