Implementing tablist name packet
Dieser Commit ist enthalten in:
Ursprung
74c3a5ab41
Commit
245eb3be74
@ -23,6 +23,7 @@ public class PacketIdManager {
|
||||
|
||||
//0x0(X) Standalone Packets
|
||||
public final static byte PING_PACKET = 0x01;
|
||||
public final static byte TABLIST_NAME = 0x02;
|
||||
//0x1(X) Bungee Inventory
|
||||
public final static byte INVENTORY_PACKET = 0x10;
|
||||
public final static byte INVENTORY_CALLBACK_PACKET = 0x11;
|
||||
|
26
SpigotCore_Main/src/de/steamwar/comms/packets/TablistNamePacket.java
Normale Datei
26
SpigotCore_Main/src/de/steamwar/comms/packets/TablistNamePacket.java
Normale Datei
@ -0,0 +1,26 @@
|
||||
package de.steamwar.comms.packets;
|
||||
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import de.steamwar.comms.PacketIdManager;
|
||||
|
||||
public class TablistNamePacket extends SpigotPacket {
|
||||
|
||||
final int swUserId;
|
||||
final String tablistName;
|
||||
|
||||
public TablistNamePacket(int swUserId, String tablistName){
|
||||
this.swUserId = swUserId;
|
||||
this.tablistName = tablistName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getName() {
|
||||
return PacketIdManager.TABLIST_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeVars(ByteArrayDataOutput byteArrayDataOutput) {
|
||||
byteArrayDataOutput.writeInt(swUserId);
|
||||
byteArrayDataOutput.writeUTF(tablistName);
|
||||
}
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren