From c2f3ab8094e833a11843cd8f798b10a5c3dcba73 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 29 Oct 2020 20:54:25 +0100 Subject: [PATCH] Fix errors in impl. Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/comms/PacketIdManager.java | 11 ++++++----- .../bungeecore/comms/handlers/TablistNameHandler.java | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/de/steamwar/bungeecore/comms/PacketIdManager.java b/src/de/steamwar/bungeecore/comms/PacketIdManager.java index 349c24e1..b2c33009 100644 --- a/src/de/steamwar/bungeecore/comms/PacketIdManager.java +++ b/src/de/steamwar/bungeecore/comms/PacketIdManager.java @@ -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; } diff --git a/src/de/steamwar/bungeecore/comms/handlers/TablistNameHandler.java b/src/de/steamwar/bungeecore/comms/handlers/TablistNameHandler.java index bd5acbc7..6f049439 100644 --- a/src/de/steamwar/bungeecore/comms/handlers/TablistNameHandler.java +++ b/src/de/steamwar/bungeecore/comms/handlers/TablistNameHandler.java @@ -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()); } }