3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-28 09:00:09 +01:00

Merge pull request #1842 from creeper123123321/fixdisablebaseprotocol

inactivate userconnection correctly when there's no translation
Dieser Commit ist enthalten in:
Nassim 2020-06-25 20:50:17 +02:00 committet von GitHub
Commit 67ef4700c7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -123,10 +123,9 @@ public class BaseProtocol1_7 extends SimpleProtocol {
// Add to ported clients // Add to ported clients
Via.getManager().handleLoginSuccess(wrapper.user()); Via.getManager().handleLoginSuccess(wrapper.user());
if (info.getPipeline().pipes().size() == 2 if (info.getPipeline().pipes().stream().allMatch(ProtocolRegistry::isBaseProtocol)) { // Only base protocol
&& info.getPipeline().pipes().get(1).getClass().isAssignableFrom(BaseProtocol1_7.class)
&& info.getPipeline().pipes().get(0).getClass() == BaseProtocol.class) // Only base protocol
wrapper.user().setActive(false); wrapper.user().setActive(false);
}
if (Via.getManager().isDebug()) { if (Via.getManager().isDebug()) {
// Print out the route to console // Print out the route to console