SteamWar/BungeeCore
Archiviert
13
2

Send waiting user
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-03-11 23:29:05 +01:00
Ursprung 555d79d932
Commit 44660d6f9f
2 geänderte Dateien mit 10 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -189,7 +189,7 @@ public class SubserverSystem {
public static void sendPlayer(Subserver subserver, ProxiedPlayer player) { public static void sendPlayer(Subserver subserver, ProxiedPlayer player) {
subserver.sendPlayer(player); subserver.sendPlayer(player);
if(!subserver.hasStarted() && FightInfoHandler.onLobby(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){ private static boolean bauRunning(ProxiedPlayer p, UUID owner){

Datei anzeigen

@ -3,16 +3,23 @@ package de.steamwar.bungeecore.comms.packets;
import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteArrayDataOutput;
import de.steamwar.bungeecore.comms.BungeePacket; import de.steamwar.bungeecore.comms.BungeePacket;
import de.steamwar.bungeecore.comms.PacketIdManager; import de.steamwar.bungeecore.comms.PacketIdManager;
import de.steamwar.bungeecore.sql.SteamwarUser;
public class StartingServerPacket extends BungeePacket { public class StartingServerPacket extends BungeePacket {
private final int user;
public StartingServerPacket(SteamwarUser user) {
this.user = user.getId();
}
@Override @Override
public int getId() { public int getId() {
return PacketIdManager.STARTING_SERVER; return PacketIdManager.STARTING_SERVER;
} }
@Override @Override
public void writeVars(ByteArrayDataOutput byteArrayDataOutput) { public void writeVars(ByteArrayDataOutput out) {
//nothing to write out.writeInt(user);
} }
} }