SteamWar/FightSystem
Archiviert
13
1

Fixing death messages

Dieser Commit ist enthalten in:
Lixfel 2019-09-20 17:57:14 +02:00
Ursprung 169a6de01a
Commit e1eb5b606a

Datei anzeigen

@ -3,6 +3,7 @@ package de.steamwar.fightsystem.listener;
import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.FightSystem;
import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.Fight;
import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.fight.FightTeam;
import org.bukkit.Bukkit;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -20,7 +21,7 @@ public class PlayerDeathListener extends BasicListener {
if(fightTeam == null) if(fightTeam == null)
return; return;
event.setDeathMessage(FightSystem.PREFIX + "§cDer Spieler " + fightTeam.getPrefix() + player.getName() + " §cist gestorben!"); Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Spieler " + fightTeam.getPrefix() + player.getName() + " §cist gestorben!");
fightTeam.getFightPlayer(player).setOut(); fightTeam.getFightPlayer(player).setOut();
player.setGameMode(GameMode.SPECTATOR); player.setGameMode(GameMode.SPECTATOR);
player.teleport(fightTeam.getSpawn()); player.teleport(fightTeam.getSpawn());