From 44660d6f9fba5502e2fa7e2c60b81c14164c1e97 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 11 Mar 2022 23:29:05 +0100 Subject: [PATCH] Send waiting user Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/SubserverSystem.java | 2 +- .../comms/packets/StartingServerPacket.java | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/bungeecore/SubserverSystem.java b/src/de/steamwar/bungeecore/SubserverSystem.java index 015393b9..b0085f07 100644 --- a/src/de/steamwar/bungeecore/SubserverSystem.java +++ b/src/de/steamwar/bungeecore/SubserverSystem.java @@ -189,7 +189,7 @@ public class SubserverSystem { public static void sendPlayer(Subserver subserver, ProxiedPlayer player) { subserver.sendPlayer(player); if(!subserver.hasStarted() && FightInfoHandler.onLobby(player)) - new StartingServerPacket().send(player); + new StartingServerPacket(SteamwarUser.get(player.getUniqueId())).send(player); } private static boolean bauRunning(ProxiedPlayer p, UUID owner){ diff --git a/src/de/steamwar/bungeecore/comms/packets/StartingServerPacket.java b/src/de/steamwar/bungeecore/comms/packets/StartingServerPacket.java index b7058c2b..1e5edf15 100644 --- a/src/de/steamwar/bungeecore/comms/packets/StartingServerPacket.java +++ b/src/de/steamwar/bungeecore/comms/packets/StartingServerPacket.java @@ -3,16 +3,23 @@ package de.steamwar.bungeecore.comms.packets; import com.google.common.io.ByteArrayDataOutput; import de.steamwar.bungeecore.comms.BungeePacket; import de.steamwar.bungeecore.comms.PacketIdManager; +import de.steamwar.bungeecore.sql.SteamwarUser; public class StartingServerPacket extends BungeePacket { + private final int user; + + public StartingServerPacket(SteamwarUser user) { + this.user = user.getId(); + } + @Override public int getId() { return PacketIdManager.STARTING_SERVER; } @Override - public void writeVars(ByteArrayDataOutput byteArrayDataOutput) { - //nothing to write + public void writeVars(ByteArrayDataOutput out) { + out.writeInt(user); } }