Merge pull request 'Implementing tablist name packet' (#66) from tablistName into master
Reviewed-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Commit
2970e1d1fa
@ -23,6 +23,7 @@ public class PacketIdManager {
|
|||||||
|
|
||||||
//0x0(X) Standalone Packets
|
//0x0(X) Standalone Packets
|
||||||
public final static byte PING_PACKET = 0x01;
|
public final static byte PING_PACKET = 0x01;
|
||||||
|
public final static byte TABLIST_NAME = 0x02;
|
||||||
//0x1(X) Bungee Inventory
|
//0x1(X) Bungee Inventory
|
||||||
public final static byte INVENTORY_PACKET = 0x10;
|
public final static byte INVENTORY_PACKET = 0x10;
|
||||||
public final static byte INVENTORY_CALLBACK_PACKET = 0x11;
|
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