inactivate userconnection correctly when there's no translation

This commit is contained in:
creeper123123321 2020-06-25 13:49:19 -03:00
parent 002ad95cad
commit 790a9d0058

View File

@ -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