Fix BaseProtocol

This commit is contained in:
creeper123123321 2018-06-27 09:51:41 -03:00
parent df2d9ba3d8
commit 7d671c2908
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -125,7 +125,7 @@ public class BaseProtocol extends Protocol {
handler(new PacketHandler() { handler(new PacketHandler() {
@Override @Override
public void handle(PacketWrapper wrapper) throws Exception { public void handle(PacketWrapper wrapper) throws Exception {
int protocol = wrapper.user().get(ProtocolInfo.class).getProtocolVersion(); int protocol = wrapper.user().get(ProtocolInfo.class).getServerProtocolVersion();
if (protocol < ProtocolVersion.v1_13.getId()) if (protocol < ProtocolVersion.v1_13.getId())
handleLoginSuccess(wrapper); handleLoginSuccess(wrapper);
} }
@ -141,7 +141,7 @@ public class BaseProtocol extends Protocol {
handler(new PacketHandler() { handler(new PacketHandler() {
@Override @Override
public void handle(PacketWrapper wrapper) throws Exception { public void handle(PacketWrapper wrapper) throws Exception {
int protocol = wrapper.user().get(ProtocolInfo.class).getProtocolVersion(); int protocol = wrapper.user().get(ProtocolInfo.class).getServerProtocolVersion();
if (protocol >= ProtocolVersion.v1_13.getId()) if (protocol >= ProtocolVersion.v1_13.getId())
handleLoginSuccess(wrapper); handleLoginSuccess(wrapper);
} }