SteamWar/BungeeCore
Archiviert
13
2

Untested tablist name handling #140

Manuell gemergt
Lixfel hat 2 Commits von untested nach master 2020-10-30 07:31:33 +01:00 zusammengeführt
2 geänderte Dateien mit 8 neuen und 11 gelöschten Zeilen
Nur Änderungen aus Commit c2f3ab8094 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -20,13 +20,14 @@
package de.steamwar.bungeecore.comms;
public class PacketIdManager {
private PacketIdManager(){}
//0x0(X) Standalone Packets
public final static byte PING_PACKET = 0x01;
public final static byte TABLIST_NAME = 0x02;
public static final byte PING_PACKET = 0x01;
public static final byte TABLIST_NAME = 0x02;
//0x1(X) Bungee Inventory
public final static byte INVENTORY_PACKET = 0x10;
public final static byte INVENTORY_CALLBACK_PACKET = 0x11;
public final static byte INVENTORY_CLOSE_PACKET = 0x12;
public static final byte INVENTORY_PACKET = 0x10;
public static final byte INVENTORY_CALLBACK_PACKET = 0x11;
public static final byte INVENTORY_CLOSE_PACKET = 0x12;
}

Datei anzeigen

@ -11,11 +11,7 @@ public class TablistNameHandler implements SpigotHandler {
@Override
public void handle(ByteArrayDataInput byteArrayDataInput) {
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(
SteamwarUser.get(
byteArrayDataInput.readInt()
).getUuid()
);
Subserver.getSubserver(player).getTablistNames().set(player, byteArrayDataInput.readUTF());
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(SteamwarUser.get(byteArrayDataInput.readInt()).getUuid());
Subserver.getSubserver(player).getTablistNames().put(player, byteArrayDataInput.readUTF());
}
}