-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for snapshot 24w03a (1.20.5)
- Loading branch information
1 parent
a1cd694
commit ec7e867
Showing
13 changed files
with
241 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 103 additions & 31 deletions
134
protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
protocol/src/main/java/net/md_5/bungee/protocol/packet/StoreCookie.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package net.md_5.bungee.protocol.packet; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import net.md_5.bungee.protocol.AbstractPacketHandler; | ||
import net.md_5.bungee.protocol.DefinedPacket; | ||
import net.md_5.bungee.protocol.ProtocolConstants; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class StoreCookie extends DefinedPacket | ||
{ | ||
|
||
private String key; | ||
private byte[] data; | ||
|
||
@Override | ||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) | ||
{ | ||
key = readString( buf ); | ||
data = readArray( buf, 5120 ); | ||
} | ||
|
||
@Override | ||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) | ||
{ | ||
writeString( key, buf ); | ||
writeArray( data, buf ); | ||
} | ||
|
||
@Override | ||
public void handle(AbstractPacketHandler handler) throws Exception | ||
{ | ||
handler.handle( this ); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
protocol/src/main/java/net/md_5/bungee/protocol/packet/Transfer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package net.md_5.bungee.protocol.packet; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import net.md_5.bungee.protocol.AbstractPacketHandler; | ||
import net.md_5.bungee.protocol.DefinedPacket; | ||
import net.md_5.bungee.protocol.ProtocolConstants; | ||
|
||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class Transfer extends DefinedPacket | ||
{ | ||
|
||
private String host; | ||
private int port; | ||
|
||
@Override | ||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) | ||
{ | ||
host = readString( buf ); | ||
port = readVarInt( buf ); | ||
} | ||
|
||
@Override | ||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) | ||
{ | ||
writeString( host, buf ); | ||
writeVarInt( port, buf ); | ||
} | ||
|
||
@Override | ||
public void handle(AbstractPacketHandler handler) throws Exception | ||
{ | ||
handler.handle( this ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters