From 790a9d0058e82ef0b26754652e91d38caffb3d7a Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Thu, 25 Jun 2020 13:49:19 -0300 Subject: [PATCH] inactivate userconnection correctly when there's no translation --- .../us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java b/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java index 1b49faaf4..09e2b0f1d 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/base/BaseProtocol1_7.java @@ -123,10 +123,9 @@ public class BaseProtocol1_7 extends SimpleProtocol { // Add to ported clients Via.getManager().handleLoginSuccess(wrapper.user()); - if (info.getPipeline().pipes().size() == 2 - && info.getPipeline().pipes().get(1).getClass().isAssignableFrom(BaseProtocol1_7.class) - && info.getPipeline().pipes().get(0).getClass() == BaseProtocol.class) // Only base protocol + if (info.getPipeline().pipes().stream().allMatch(ProtocolRegistry::isBaseProtocol)) { // Only base protocol wrapper.user().setActive(false); + } if (Via.getManager().isDebug()) { // Print out the route to console