Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Fixed some issues happened while merging.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleiss committed Mar 3, 2016
1 parent ba4625a commit bb0bb71
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public enum Protocol
TO_CLIENT.registerPacket( 0x01, 0x23, Login.class );
TO_CLIENT.registerPacket( 0x02, 0x0F, Chat.class );
TO_CLIENT.registerPacket( 0x07, 0x33, Respawn.class );
TO_CLIENT.registerPacket( 0x0C, 0x0C, BossBar.class, true );
TO_CLIENT.registerPacket( 0x0C, 0x0C, BossBar.class, true, false );
TO_CLIENT.registerPacket( 0x38, 0x2D, PlayerListItem.class ); // PlayerInfo
TO_CLIENT.registerPacket( 0x3A, 0x0E, TabCompleteResponse.class );
TO_CLIENT.registerPacket( 0x3B, 0x3F, ScoreboardObjective.class );
Expand All @@ -69,7 +69,7 @@ public enum Protocol
TO_CLIENT.registerPacket( 0x3F, 0x18, PluginMessage.class );
TO_CLIENT.registerPacket( 0x40, 0x1A, Kick.class );
TO_CLIENT.registerPacket( 0x45, 0x45, Title.class );
TO_CLIENT.registerPacket( 0x46, 0x46, SetCompression.class, true );
TO_CLIENT.registerPacket( 0x46, 0x46, SetCompression.class, false , true );
TO_CLIENT.registerPacket( 0x47, 0x48, PlayerListHeaderFooter.class );

TO_SERVER.registerPacket( 0x00, 0x0B, KeepAlive.class );
Expand Down Expand Up @@ -175,11 +175,11 @@ protected final void registerPacket(int id, Class<? extends DefinedPacket> packe

protected final void registerPacket(int id, int newId, Class<? extends DefinedPacket> packetClass)
{
registerPacket( id, newId, packetClass, false );
registerPacket( id, newId, packetClass, false , false);

}

protected final void registerPacket(int id, int newId, Class<? extends DefinedPacket> packetClass, boolean newOnly)
protected final void registerPacket(int id, int newId, Class<? extends DefinedPacket> packetClass, boolean newOnly, boolean oldOnly)
{
try
{
Expand All @@ -195,16 +195,17 @@ protected final void registerPacket(int id, int newId, Class<? extends DefinedPa
packetRemapInv.get( ProtocolConstants.MINECRAFT_1_7_2 ).put( id, id );
packetRemap.get( ProtocolConstants.MINECRAFT_1_7_6 ).put( id, id );
packetRemapInv.get( ProtocolConstants.MINECRAFT_1_7_6 ).put( id, id );
packetRemap.get( ProtocolConstants.MINECRAFT_1_8 ).put( id, id );
packetRemapInv.get( ProtocolConstants.MINECRAFT_1_8 ).put( id, id );
if ( !newOnly )
{
packetRemap.get( ProtocolConstants.MINECRAFT_1_8 ).put( id, id );
packetRemapInv.get( ProtocolConstants.MINECRAFT_1_8 ).put( id, id );
}

packetRemap.get( ProtocolConstants.MINECRAFT_1_9 ).put( newId, id );
packetRemapInv.get( ProtocolConstants.MINECRAFT_1_9 ).put( id, newId );
if( !oldOnly )
{
packetRemap.get( ProtocolConstants.MINECRAFT_1_9 ).put( newId, id );
packetRemapInv.get( ProtocolConstants.MINECRAFT_1_9 ).put( id, newId );
}
}

protected final void unregisterPacket(int id)
Expand Down

0 comments on commit bb0bb71

Please sign in to comment.