mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 11:15:47 +01:00
Add team packet.
This commit is contained in:
parent
14fcb90395
commit
c97f113497
@ -229,6 +229,7 @@ public abstract class DefinedPacket implements DataOutput
|
||||
classes[0xCE] = PacketCEScoreboardObjective.class;
|
||||
classes[0xCF] = PacketCFScoreboardScore.class;
|
||||
classes[0xD0] = PacketD0DisplayScoreboard.class;
|
||||
classes[0xD1] = PacketD1Team.class;
|
||||
classes[0xFA] = PacketFAPluginMessage.class;
|
||||
classes[0xFC] = PacketFCEncryptionResponse.class;
|
||||
classes[0xFD] = PacketFDEncryptionRequest.class;
|
||||
|
50
proxy/src/main/java/net/md_5/bungee/packet/PacketD1Team.java
Normal file
50
proxy/src/main/java/net/md_5/bungee/packet/PacketD1Team.java
Normal file
@ -0,0 +1,50 @@
|
||||
package net.md_5.bungee.packet;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ToString
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PacketD1Team extends DefinedPacket
|
||||
{
|
||||
|
||||
public String name;
|
||||
/**
|
||||
* 0 - create, 1 remove, 2 info update, 3 player add, 4 player remove.
|
||||
*/
|
||||
public byte mode;
|
||||
public String displayName;
|
||||
public String prefix;
|
||||
public String suffix;
|
||||
public byte friendlyFire;
|
||||
public short playerCount;
|
||||
public String[] players;
|
||||
|
||||
public PacketD1Team(byte[] buf)
|
||||
{
|
||||
super( 0xD1, buf );
|
||||
name = readUTF();
|
||||
mode = readByte();
|
||||
if ( mode == 0 || mode == 2 )
|
||||
{
|
||||
displayName = readUTF();
|
||||
prefix = readUTF();
|
||||
suffix = readUTF();
|
||||
friendlyFire = readByte();
|
||||
}
|
||||
if ( mode == 0 || mode == 3 || mode == 4 )
|
||||
{
|
||||
players = new String[ readShort() ];
|
||||
for ( int i = 0; i < players.length; i++ )
|
||||
{
|
||||
players[i] = readUTF();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(PacketHandler handler) throws Exception
|
||||
{
|
||||
handler.handle( this );
|
||||
}
|
||||
}
|
@ -68,6 +68,10 @@ public abstract class PacketHandler
|
||||
{
|
||||
}
|
||||
|
||||
public void handle(PacketD1Team team) throws Exception
|
||||
{
|
||||
}
|
||||
|
||||
public void handle(PacketFAPluginMessage pluginMessage) throws Exception
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user