Procol -> Protocol. Fix typo, thanks @libraryaddict
This commit is contained in:
parent
3c961cd5d9
commit
703a393888
@ -11,7 +11,7 @@ import lombok.ToString;
|
|||||||
public class Packet2Handshake extends DefinedPacket
|
public class Packet2Handshake extends DefinedPacket
|
||||||
{
|
{
|
||||||
|
|
||||||
private byte procolVersion;
|
private byte protocolVersion;
|
||||||
private String username;
|
private String username;
|
||||||
private String host;
|
private String host;
|
||||||
private int port;
|
private int port;
|
||||||
@ -24,7 +24,7 @@ public class Packet2Handshake extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void read(ByteBuf buf)
|
public void read(ByteBuf buf)
|
||||||
{
|
{
|
||||||
procolVersion = buf.readByte();
|
protocolVersion = buf.readByte();
|
||||||
username = readString( buf );
|
username = readString( buf );
|
||||||
host = readString( buf );
|
host = readString( buf );
|
||||||
port = buf.readInt();
|
port = buf.readInt();
|
||||||
@ -33,7 +33,7 @@ public class Packet2Handshake extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void write(ByteBuf buf)
|
public void write(ByteBuf buf)
|
||||||
{
|
{
|
||||||
buf.writeByte( procolVersion );
|
buf.writeByte( protocolVersion );
|
||||||
writeString( username, buf );
|
writeString( username, buf );
|
||||||
writeString( host, buf );
|
writeString( host, buf );
|
||||||
buf.writeInt( port );
|
buf.writeInt( port );
|
||||||
|
@ -198,10 +198,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
this.vHost = new InetSocketAddress( handshake.getHost(), handshake.getPort() );
|
this.vHost = new InetSocketAddress( handshake.getHost(), handshake.getPort() );
|
||||||
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
||||||
|
|
||||||
if ( handshake.getProcolVersion() > Vanilla.PROTOCOL_VERSION )
|
if ( handshake.getProtocolVersion() > Vanilla.PROTOCOL_VERSION )
|
||||||
{
|
{
|
||||||
disconnect( bungee.getTranslation( "outdated_server" ) );
|
disconnect( bungee.getTranslation( "outdated_server" ) );
|
||||||
} else if ( handshake.getProcolVersion() < Vanilla.PROTOCOL_VERSION )
|
} else if ( handshake.getProtocolVersion() < Vanilla.PROTOCOL_VERSION )
|
||||||
{
|
{
|
||||||
disconnect( bungee.getTranslation( "outdated_client" ) );
|
disconnect( bungee.getTranslation( "outdated_client" ) );
|
||||||
}
|
}
|
||||||
@ -381,7 +381,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
@Override
|
@Override
|
||||||
public byte getVersion()
|
public byte getVersion()
|
||||||
{
|
{
|
||||||
return ( handshake == null ) ? version : handshake.getProcolVersion();
|
return ( handshake == null ) ? version : handshake.getProtocolVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user