Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for snapshot 24w03a (1.20.5) #3601

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.ToString;
import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.plugin.Event;
import net.md_5.bungee.protocol.packet.Handshake;
import net.md_5.bungee.protocol.packet.handshake.Handshake;

/**
* Event called to represent a player first making their presence and username
Expand Down
1 change: 0 additions & 1 deletion bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public static void main(String[] args) throws Exception
System.out.println( "You can check your Java version with the command: java -version" );
return;
}

BungeeCordLauncher.main( args );
}
}
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
package net.md_5.bungee.protocol;

import net.md_5.bungee.protocol.packet.BossBar;
import net.md_5.bungee.protocol.packet.Chat;
import net.md_5.bungee.protocol.packet.ClearTitles;
import net.md_5.bungee.protocol.packet.ClientChat;
import net.md_5.bungee.protocol.packet.ClientCommand;
import net.md_5.bungee.protocol.packet.ClientSettings;
import net.md_5.bungee.protocol.packet.ClientStatus;
import net.md_5.bungee.protocol.packet.Commands;
import net.md_5.bungee.protocol.packet.EncryptionRequest;
import net.md_5.bungee.protocol.packet.EncryptionResponse;
import net.md_5.bungee.protocol.packet.EntityStatus;
import net.md_5.bungee.protocol.packet.FinishConfiguration;
import net.md_5.bungee.protocol.packet.GameState;
import net.md_5.bungee.protocol.packet.Handshake;
import net.md_5.bungee.protocol.packet.KeepAlive;
import net.md_5.bungee.protocol.packet.Kick;
import net.md_5.bungee.protocol.packet.LegacyHandshake;
import net.md_5.bungee.protocol.packet.LegacyPing;
import net.md_5.bungee.protocol.packet.Login;
import net.md_5.bungee.protocol.packet.LoginAcknowledged;
import net.md_5.bungee.protocol.packet.LoginPayloadRequest;
import net.md_5.bungee.protocol.packet.LoginPayloadResponse;
import net.md_5.bungee.protocol.packet.LoginRequest;
import net.md_5.bungee.protocol.packet.LoginSuccess;
import net.md_5.bungee.protocol.packet.PingPacket;
import net.md_5.bungee.protocol.packet.PlayerListHeaderFooter;
import net.md_5.bungee.protocol.packet.PlayerListItem;
import net.md_5.bungee.protocol.packet.PlayerListItemRemove;
import net.md_5.bungee.protocol.packet.PlayerListItemUpdate;
import net.md_5.bungee.protocol.packet.PluginMessage;
import net.md_5.bungee.protocol.packet.Respawn;
import net.md_5.bungee.protocol.packet.ScoreboardDisplay;
import net.md_5.bungee.protocol.packet.ScoreboardObjective;
import net.md_5.bungee.protocol.packet.ScoreboardScore;
import net.md_5.bungee.protocol.packet.ScoreboardScoreReset;
import net.md_5.bungee.protocol.packet.ServerData;
import net.md_5.bungee.protocol.packet.SetCompression;
import net.md_5.bungee.protocol.packet.StartConfiguration;
import net.md_5.bungee.protocol.packet.StatusRequest;
import net.md_5.bungee.protocol.packet.StatusResponse;
import net.md_5.bungee.protocol.packet.Subtitle;
import net.md_5.bungee.protocol.packet.SystemChat;
import net.md_5.bungee.protocol.packet.TabCompleteRequest;
import net.md_5.bungee.protocol.packet.TabCompleteResponse;
import net.md_5.bungee.protocol.packet.Team;
import net.md_5.bungee.protocol.packet.Title;
import net.md_5.bungee.protocol.packet.TitleTimes;
import net.md_5.bungee.protocol.packet.ViewDistance;
import net.md_5.bungee.protocol.packet.common.ClientSettings;
import net.md_5.bungee.protocol.packet.common.KeepAlive;
import net.md_5.bungee.protocol.packet.common.Kick;
import net.md_5.bungee.protocol.packet.common.PluginMessage;
import net.md_5.bungee.protocol.packet.common.StoreCookie;
import net.md_5.bungee.protocol.packet.common.Transfer;
import net.md_5.bungee.protocol.packet.configuration.FinishConfiguration;
import net.md_5.bungee.protocol.packet.game.BossBar;
import net.md_5.bungee.protocol.packet.game.Chat;
import net.md_5.bungee.protocol.packet.game.ClearTitles;
import net.md_5.bungee.protocol.packet.game.ClientChat;
import net.md_5.bungee.protocol.packet.game.ClientCommand;
import net.md_5.bungee.protocol.packet.game.ClientStatus;
import net.md_5.bungee.protocol.packet.game.Commands;
import net.md_5.bungee.protocol.packet.game.EntityStatus;
import net.md_5.bungee.protocol.packet.game.GameState;
import net.md_5.bungee.protocol.packet.game.Login;
import net.md_5.bungee.protocol.packet.game.PlayerListHeaderFooter;
import net.md_5.bungee.protocol.packet.game.PlayerListItem;
import net.md_5.bungee.protocol.packet.game.PlayerListItemRemove;
import net.md_5.bungee.protocol.packet.game.PlayerListItemUpdate;
import net.md_5.bungee.protocol.packet.game.Respawn;
import net.md_5.bungee.protocol.packet.game.ScoreboardDisplay;
import net.md_5.bungee.protocol.packet.game.ScoreboardObjective;
import net.md_5.bungee.protocol.packet.game.ScoreboardScore;
import net.md_5.bungee.protocol.packet.game.ScoreboardScoreReset;
import net.md_5.bungee.protocol.packet.game.ServerData;
import net.md_5.bungee.protocol.packet.game.StartConfiguration;
import net.md_5.bungee.protocol.packet.game.Subtitle;
import net.md_5.bungee.protocol.packet.game.SystemChat;
import net.md_5.bungee.protocol.packet.game.TabCompleteRequest;
import net.md_5.bungee.protocol.packet.game.TabCompleteResponse;
import net.md_5.bungee.protocol.packet.game.Team;
import net.md_5.bungee.protocol.packet.game.Title;
import net.md_5.bungee.protocol.packet.game.TitleTimes;
import net.md_5.bungee.protocol.packet.game.ViewDistance;
import net.md_5.bungee.protocol.packet.handshake.Handshake;
import net.md_5.bungee.protocol.packet.login.EncryptionRequest;
import net.md_5.bungee.protocol.packet.login.EncryptionResponse;
import net.md_5.bungee.protocol.packet.login.LoginAcknowledged;
import net.md_5.bungee.protocol.packet.login.LoginPayloadRequest;
import net.md_5.bungee.protocol.packet.login.LoginPayloadResponse;
import net.md_5.bungee.protocol.packet.login.LoginRequest;
import net.md_5.bungee.protocol.packet.login.LoginSuccess;
import net.md_5.bungee.protocol.packet.login.SetCompression;
import net.md_5.bungee.protocol.packet.status.PingPacket;
import net.md_5.bungee.protocol.packet.status.StatusRequest;
import net.md_5.bungee.protocol.packet.status.StatusResponse;

public abstract class AbstractPacketHandler
{
Expand Down Expand Up @@ -243,4 +245,12 @@ public void handle(StartConfiguration startConfiguration) throws Exception
public void handle(FinishConfiguration finishConfiguration) throws Exception
{
}

public void handle(Transfer transfer) throws Exception
{
}

public void handle(StoreCookie storeCookie) throws Exception
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) t
try
{
int packetId = DefinedPacket.readVarInt( in );

DefinedPacket packet = prot.createPacket( packetId, protocolVersion );

if ( packet != null )
{
packet.read( in, protocol, prot.getDirection(), protocolVersion );

if ( in.isReadable() )
{
throw new BadPacketException( "Packet " + protocol + ":" + prot.getDirection() + "/" + packetId + " (" + packet.getClass().getSimpleName() + ") larger than expected, extra bytes: " + in.readableBytes() );
Expand Down
Loading