Dieser Commit ist enthalten in:
Ursprung
76ebcc95a0
Commit
b5db2a4c70
@ -32,7 +32,9 @@ import de.steamwar.misslewars.listener.*;
|
||||
import de.steamwar.misslewars.listener.special.BarrierListener;
|
||||
import de.steamwar.misslewars.listener.special.SpaceListener;
|
||||
import de.steamwar.misslewars.slowmo.SlowMoRunner;
|
||||
import de.steamwar.network.NetworkSender;
|
||||
import de.steamwar.network.packets.common.FightEndsPacket;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -147,9 +149,20 @@ public class MissileWars extends JavaPlugin {
|
||||
player.setGameMode(GameMode.SPECTATOR);
|
||||
}
|
||||
|
||||
// TODO: FightsEndPacket for ELO...
|
||||
byte ergebnis = winner == blueTeam ? (byte) 1 : (byte) 2;
|
||||
if (Config.isEvent()) {
|
||||
Config.EventKampf.setErgebnis(winner == blueTeam ? 1 : 2);
|
||||
Config.EventKampf.setErgebnis(ergebnis);
|
||||
} else {
|
||||
FightEndsPacket packet = FightEndsPacket.builder()
|
||||
.gameMode("MissileWars")
|
||||
.duration((int)((System.currentTimeMillis() - FightScoreboard.getStartTime()) / 1000))
|
||||
.win(ergebnis)
|
||||
.bluePlayers(blueTeam.getPlayers().stream().map(Player::getUniqueId).map(SteamwarUser::get).map(SteamwarUser::getId).collect(Collectors.toList()))
|
||||
.redPlayers(redTeam.getPlayers().stream().map(Player::getUniqueId).map(SteamwarUser::get).map(SteamwarUser::getId).collect(Collectors.toList()))
|
||||
.blueSchem(-1)
|
||||
.redSchem(-1)
|
||||
.build();
|
||||
NetworkSender.send(packet);
|
||||
}
|
||||
|
||||
switch (reason) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren