1.8 isn't a snapshot anymore
This commit is contained in:
parent
62981e4c70
commit
988490ba87
@ -104,7 +104,7 @@ public enum Protocol
|
|||||||
public static List<Integer> supportedVersions = Arrays.asList(
|
public static List<Integer> supportedVersions = Arrays.asList(
|
||||||
ProtocolConstants.MINECRAFT_1_7_2,
|
ProtocolConstants.MINECRAFT_1_7_2,
|
||||||
ProtocolConstants.MINECRAFT_1_7_6,
|
ProtocolConstants.MINECRAFT_1_7_6,
|
||||||
ProtocolConstants.MINECRAFT_SNAPSHOT
|
ProtocolConstants.MINECRAFT_1_8
|
||||||
);
|
);
|
||||||
/*========================================================================*/
|
/*========================================================================*/
|
||||||
public final DirectionData TO_SERVER = new DirectionData( ProtocolConstants.Direction.TO_SERVER );
|
public final DirectionData TO_SERVER = new DirectionData( ProtocolConstants.Direction.TO_SERVER );
|
||||||
|
@ -5,7 +5,7 @@ public class ProtocolConstants
|
|||||||
|
|
||||||
public static final int MINECRAFT_1_7_2 = 4;
|
public static final int MINECRAFT_1_7_2 = 4;
|
||||||
public static final int MINECRAFT_1_7_6 = 5;
|
public static final int MINECRAFT_1_7_6 = 5;
|
||||||
public static final int MINECRAFT_SNAPSHOT = 47;
|
public static final int MINECRAFT_1_8 = 47;
|
||||||
|
|
||||||
public enum Direction
|
public enum Direction
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ public class Chat extends DefinedPacket
|
|||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
message = readString( buf );
|
message = readString( buf );
|
||||||
if ( direction == ProtocolConstants.Direction.TO_CLIENT && protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( direction == ProtocolConstants.Direction.TO_CLIENT && protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
position = buf.readByte();
|
position = buf.readByte();
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ public class Chat extends DefinedPacket
|
|||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
writeString( message, buf );
|
writeString( message, buf );
|
||||||
if ( direction == ProtocolConstants.Direction.TO_CLIENT && protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( direction == ProtocolConstants.Direction.TO_CLIENT && protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
buf.writeByte( position );
|
buf.writeByte( position );
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public class EncryptionRequest extends DefinedPacket
|
|||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
serverId = readString( buf );
|
serverId = readString( buf );
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
publicKey = readArrayLegacy( buf );
|
publicKey = readArrayLegacy( buf );
|
||||||
verifyToken = readArrayLegacy( buf );
|
verifyToken = readArrayLegacy( buf );
|
||||||
@ -39,7 +39,7 @@ public class EncryptionRequest extends DefinedPacket
|
|||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
writeString( serverId, buf );
|
writeString( serverId, buf );
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeArrayLegacy( publicKey, buf, false );
|
writeArrayLegacy( publicKey, buf, false );
|
||||||
writeArrayLegacy( verifyToken, buf, false );
|
writeArrayLegacy( verifyToken, buf, false );
|
||||||
|
@ -22,7 +22,7 @@ public class EncryptionResponse extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
sharedSecret = readArrayLegacy( buf );
|
sharedSecret = readArrayLegacy( buf );
|
||||||
verifyToken = readArrayLegacy( buf );
|
verifyToken = readArrayLegacy( buf );
|
||||||
@ -36,7 +36,7 @@ public class EncryptionResponse extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeArrayLegacy( sharedSecret, buf, false );
|
writeArrayLegacy( sharedSecret, buf, false );
|
||||||
writeArrayLegacy( verifyToken, buf, false );
|
writeArrayLegacy( verifyToken, buf, false );
|
||||||
|
@ -21,7 +21,7 @@ public class KeepAlive extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
randomId = readVarInt( buf );
|
randomId = readVarInt( buf );
|
||||||
} else
|
} else
|
||||||
@ -33,7 +33,7 @@ public class KeepAlive extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeVarInt( randomId, buf );
|
writeVarInt( randomId, buf );
|
||||||
} else
|
} else
|
||||||
|
@ -9,8 +9,6 @@ import net.md_5.bungee.protocol.AbstractPacketHandler;
|
|||||||
import net.md_5.bungee.protocol.ProtocolConstants;
|
import net.md_5.bungee.protocol.ProtocolConstants;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.chat.ComponentSerializer;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@ -24,7 +22,7 @@ public class PlayerListItem extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
items = new Item[ 1 ];
|
items = new Item[ 1 ];
|
||||||
Item item = items[ 0 ] = new Item();
|
Item item = items[ 0 ] = new Item();
|
||||||
@ -88,7 +86,7 @@ public class PlayerListItem extends DefinedPacket
|
|||||||
@Override
|
@Override
|
||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
Item item = items[0]; // Only one at a time
|
Item item = items[0]; // Only one at a time
|
||||||
writeString( item.displayName, buf ); // TODO: Server unique only!
|
writeString( item.displayName, buf ); // TODO: Server unique only!
|
||||||
|
@ -33,7 +33,7 @@ public class PluginMessage extends DefinedPacket
|
|||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
tag = readString( buf );
|
tag = readString( buf );
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
data = readArrayLegacy( buf );
|
data = readArrayLegacy( buf );
|
||||||
} else
|
} else
|
||||||
@ -47,7 +47,7 @@ public class PluginMessage extends DefinedPacket
|
|||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
writeString( tag, buf );
|
writeString( tag, buf );
|
||||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeArrayLegacy( data, buf, allowExtendedPacket );
|
writeArrayLegacy( data, buf, allowExtendedPacket );
|
||||||
} else
|
} else
|
||||||
|
@ -33,7 +33,7 @@ public class ScoreboardObjective extends DefinedPacket
|
|||||||
value = readString( buf );
|
value = readString( buf );
|
||||||
}
|
}
|
||||||
action = buf.readByte();
|
action = buf.readByte();
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT && ( action == 0 || action == 2 ) )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 && ( action == 0 || action == 2 ) )
|
||||||
{
|
{
|
||||||
value = readString( buf );
|
value = readString( buf );
|
||||||
type = readString( buf );
|
type = readString( buf );
|
||||||
@ -49,7 +49,7 @@ public class ScoreboardObjective extends DefinedPacket
|
|||||||
writeString( value, buf );
|
writeString( value, buf );
|
||||||
}
|
}
|
||||||
buf.writeByte( action );
|
buf.writeByte( action );
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT && ( action == 0 || action == 2 ) )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 && ( action == 0 || action == 2 ) )
|
||||||
{
|
{
|
||||||
writeString( value, buf );
|
writeString( value, buf );
|
||||||
writeString( type, buf );
|
writeString( type, buf );
|
||||||
|
@ -29,7 +29,7 @@ public class ScoreboardScore extends DefinedPacket
|
|||||||
{
|
{
|
||||||
itemName = readString( buf );
|
itemName = readString( buf );
|
||||||
action = buf.readByte();
|
action = buf.readByte();
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
scoreName = readString( buf );
|
scoreName = readString( buf );
|
||||||
if ( action != 1 )
|
if ( action != 1 )
|
||||||
@ -51,7 +51,7 @@ public class ScoreboardScore extends DefinedPacket
|
|||||||
{
|
{
|
||||||
writeString( itemName, buf );
|
writeString( itemName, buf );
|
||||||
buf.writeByte( action );
|
buf.writeByte( action );
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeString( scoreName, buf );
|
writeString( scoreName, buf );
|
||||||
if ( action != 1 )
|
if ( action != 1 )
|
||||||
|
@ -24,7 +24,7 @@ public class TabCompleteRequest extends DefinedPacket
|
|||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
cursor = readString( buf );
|
cursor = readString( buf );
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
if ( hasPositon = buf.readBoolean() )
|
if ( hasPositon = buf.readBoolean() )
|
||||||
{
|
{
|
||||||
@ -37,7 +37,7 @@ public class TabCompleteRequest extends DefinedPacket
|
|||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
writeString( cursor, buf );
|
writeString( cursor, buf );
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
buf.writeBoolean( hasPositon );
|
buf.writeBoolean( hasPositon );
|
||||||
if ( hasPositon )
|
if ( hasPositon )
|
||||||
|
@ -50,7 +50,7 @@ public class Team extends DefinedPacket
|
|||||||
prefix = readString( buf );
|
prefix = readString( buf );
|
||||||
suffix = readString( buf );
|
suffix = readString( buf );
|
||||||
friendlyFire = buf.readByte();
|
friendlyFire = buf.readByte();
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
nameTagVisibility = readString( buf );
|
nameTagVisibility = readString( buf );
|
||||||
color = buf.readByte();
|
color = buf.readByte();
|
||||||
@ -58,7 +58,7 @@ public class Team extends DefinedPacket
|
|||||||
}
|
}
|
||||||
if ( mode == 0 || mode == 3 || mode == 4 )
|
if ( mode == 0 || mode == 3 || mode == 4 )
|
||||||
{
|
{
|
||||||
int len = ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT ) ? readVarInt( buf ) : buf.readShort();
|
int len = ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 ) ? readVarInt( buf ) : buf.readShort();
|
||||||
players = new String[ len ];
|
players = new String[ len ];
|
||||||
for ( int i = 0; i < len; i++ )
|
for ( int i = 0; i < len; i++ )
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ public class Team extends DefinedPacket
|
|||||||
writeString( prefix, buf );
|
writeString( prefix, buf );
|
||||||
writeString( suffix, buf );
|
writeString( suffix, buf );
|
||||||
buf.writeByte( friendlyFire );
|
buf.writeByte( friendlyFire );
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeString( nameTagVisibility, buf );
|
writeString( nameTagVisibility, buf );
|
||||||
buf.writeByte( color );
|
buf.writeByte( color );
|
||||||
@ -86,7 +86,7 @@ public class Team extends DefinedPacket
|
|||||||
}
|
}
|
||||||
if ( mode == 0 || mode == 3 || mode == 4 )
|
if ( mode == 0 || mode == 3 || mode == 4 )
|
||||||
{
|
{
|
||||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
writeVarInt( players.length, buf );
|
writeVarInt( players.length, buf );
|
||||||
} else
|
} else
|
||||||
|
@ -152,7 +152,7 @@ public class BungeeTitle implements Title
|
|||||||
@Override
|
@Override
|
||||||
public Title send(ProxiedPlayer player)
|
public Title send(ProxiedPlayer player)
|
||||||
{
|
{
|
||||||
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
// Send the packets in the correct order
|
// Send the packets in the correct order
|
||||||
sendPacket( player, clear );
|
sendPacket( player, clear );
|
||||||
|
@ -193,7 +193,7 @@ public class ServerConnector extends PacketHandler
|
|||||||
|
|
||||||
user.unsafe().sendPacket( modLogin );
|
user.unsafe().sendPacket( modLogin );
|
||||||
|
|
||||||
if ( user.getPendingConnection().getVersion() < ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( user.getPendingConnection().getVersion() < ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
MinecraftOutput out = new MinecraftOutput();
|
MinecraftOutput out = new MinecraftOutput();
|
||||||
out.writeStringUTF8WithoutLengthHeaderBecauseDinnerboneStuffedUpTheMCBrandPacket( ProxyServer.getInstance().getName() + " (" + ProxyServer.getInstance().getVersion() + ")" );
|
out.writeStringUTF8WithoutLengthHeaderBecauseDinnerboneStuffedUpTheMCBrandPacket( ProxyServer.getInstance().getName() + " (" + ProxyServer.getInstance().getVersion() + ")" );
|
||||||
|
@ -393,7 +393,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
public void sendMessage(ChatMessageType position, BaseComponent... message)
|
public void sendMessage(ChatMessageType position, BaseComponent... message)
|
||||||
{
|
{
|
||||||
// Action bar doesn't display the new JSON formattings, legacy works - send it using this for now
|
// Action bar doesn't display the new JSON formattings, legacy works - send it using this for now
|
||||||
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
sendMessage( position, ComponentSerializer.toString( new TextComponent( TextComponent.toLegacyText( message ) ) ) );
|
sendMessage( position, ComponentSerializer.toString( new TextComponent( TextComponent.toLegacyText( message ) ) ) );
|
||||||
} else
|
} else
|
||||||
@ -406,7 +406,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
public void sendMessage(ChatMessageType position, BaseComponent message)
|
public void sendMessage(ChatMessageType position, BaseComponent message)
|
||||||
{
|
{
|
||||||
// Action bar doesn't display the new JSON formattings, legacy works - send it using this for now
|
// Action bar doesn't display the new JSON formattings, legacy works - send it using this for now
|
||||||
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
sendMessage( position, ComponentSerializer.toString( new TextComponent( TextComponent.toLegacyText( message ) ) ) );
|
sendMessage( position, ComponentSerializer.toString( new TextComponent( TextComponent.toLegacyText( message ) ) ) );
|
||||||
} else
|
} else
|
||||||
@ -543,7 +543,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
@Override
|
@Override
|
||||||
public void setTabHeader(BaseComponent header, BaseComponent footer)
|
public void setTabHeader(BaseComponent header, BaseComponent footer)
|
||||||
{
|
{
|
||||||
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
unsafe().sendPacket( new PlayerListHeaderFooter(
|
unsafe().sendPacket( new PlayerListHeaderFooter(
|
||||||
( header != null ) ? ComponentSerializer.toString( header ) : EMPTY_TEXT,
|
( header != null ) ? ComponentSerializer.toString( header ) : EMPTY_TEXT,
|
||||||
@ -555,7 +555,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
@Override
|
@Override
|
||||||
public void setTabHeader(BaseComponent[] header, BaseComponent[] footer)
|
public void setTabHeader(BaseComponent[] header, BaseComponent[] footer)
|
||||||
{
|
{
|
||||||
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
unsafe().sendPacket( new PlayerListHeaderFooter(
|
unsafe().sendPacket( new PlayerListHeaderFooter(
|
||||||
( header != null ) ? ComponentSerializer.toString( header ) : EMPTY_TEXT,
|
( header != null ) ? ComponentSerializer.toString( header ) : EMPTY_TEXT,
|
||||||
|
@ -226,7 +226,7 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
|
|
||||||
if ( pluginMessage.getTag().equals( "MC|Brand" ) )
|
if ( pluginMessage.getTag().equals( "MC|Brand" ) )
|
||||||
{
|
{
|
||||||
if ( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -30,8 +30,8 @@ public abstract class EntityMap
|
|||||||
return new EntityMap_1_7_2();
|
return new EntityMap_1_7_2();
|
||||||
case ProtocolConstants.MINECRAFT_1_7_6:
|
case ProtocolConstants.MINECRAFT_1_7_6:
|
||||||
return new EntityMap_1_7_6();
|
return new EntityMap_1_7_6();
|
||||||
case ProtocolConstants.MINECRAFT_SNAPSHOT:
|
case ProtocolConstants.MINECRAFT_1_8:
|
||||||
return new EntityMap_14_21_b();
|
return new EntityMap_1_8();
|
||||||
}
|
}
|
||||||
throw new RuntimeException( "Version " + version + " has no entity map" );
|
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ import net.md_5.bungee.protocol.DefinedPacket;
|
|||||||
import net.md_5.bungee.protocol.ProtocolConstants;
|
import net.md_5.bungee.protocol.ProtocolConstants;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
class EntityMap_14_21_b extends EntityMap
|
class EntityMap_1_8 extends EntityMap
|
||||||
{
|
{
|
||||||
|
|
||||||
EntityMap_14_21_b()
|
EntityMap_1_8()
|
||||||
{
|
{
|
||||||
addRewrite( 0x04, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Equipment
|
addRewrite( 0x04, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Equipment
|
||||||
addRewrite( 0x0A, ProtocolConstants.Direction.TO_CLIENT, true ); // Use bed
|
addRewrite( 0x0A, ProtocolConstants.Direction.TO_CLIENT, true ); // Use bed
|
@ -90,7 +90,7 @@ public class Global extends TabList
|
|||||||
item.setGamemode( ( (UserConnection) p ).getGamemode() );
|
item.setGamemode( ( (UserConnection) p ).getGamemode() );
|
||||||
item.setPing( p.getPing() );
|
item.setPing( p.getPing() );
|
||||||
}
|
}
|
||||||
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
player.unsafe().sendPacket( playerListItem );
|
player.unsafe().sendPacket( playerListItem );
|
||||||
} else
|
} else
|
||||||
|
@ -72,7 +72,7 @@ public class ServerUnique extends TabList
|
|||||||
item.setDisplayName( username );
|
item.setDisplayName( username );
|
||||||
}
|
}
|
||||||
packet.setItems( items );
|
packet.setItems( items );
|
||||||
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
|
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
|
||||||
{
|
{
|
||||||
player.unsafe().sendPacket( packet );
|
player.unsafe().sendPacket( packet );
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user