From 87de724d40cf4bafc63a099e355c3e4c582ed555 Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Sun, 14 Apr 2019 00:31:37 +0200 Subject: [PATCH] hotfixes Signed-off-by: Yaruma3341 --- src/me/yaruma/fightsystem/commands/AkCommand.java | 1 + .../yaruma/fightsystem/listener/PlayerDeathListener.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/me/yaruma/fightsystem/commands/AkCommand.java b/src/me/yaruma/fightsystem/commands/AkCommand.java index a4d9337..0534710 100644 --- a/src/me/yaruma/fightsystem/commands/AkCommand.java +++ b/src/me/yaruma/fightsystem/commands/AkCommand.java @@ -84,6 +84,7 @@ public class AkCommand implements CommandExecutor { if(target != null) { if(!(Fight.getOpposite(fightTeam).getInvited().contains(target) && fightTeam.getInvited().contains(target))) { fightTeam.getInvited().add(target); + target.sendMessage(FightSystem.PREFIX + "§aDu wurdest von §6" + player.getName() + " §ain sein Team eingeladen!"); player.sendMessage(FightSystem.PREFIX + "§aDu hast den Spieler §6" + target.getName() + " §ain dein Team eingeladen!"); } else player.sendMessage(FightSystem.PREFIX + "§cDieser Spieler wurde bereits eingeladen!"); diff --git a/src/me/yaruma/fightsystem/listener/PlayerDeathListener.java b/src/me/yaruma/fightsystem/listener/PlayerDeathListener.java index 25394ad..c14e727 100644 --- a/src/me/yaruma/fightsystem/listener/PlayerDeathListener.java +++ b/src/me/yaruma/fightsystem/listener/PlayerDeathListener.java @@ -3,6 +3,8 @@ package me.yaruma.fightsystem.listener; import me.yaruma.fightsystem.FightSystem; import me.yaruma.fightsystem.fight.Fight; import me.yaruma.fightsystem.fight.FightTeam; +import me.yaruma.fightsystem.utils.Config; +import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -20,6 +22,11 @@ public class PlayerDeathListener implements Listener { FightTeam fightTeam = Fight.getPlayerTeam(player); event.setDeathMessage(FightSystem.PREFIX + "§cDer Spieler §6" + player.getName() + " §cist gestorben!"); fightTeam.getFightPlayer(player).setOut(true); + player.setGameMode(GameMode.SPECTATOR); + if(fightTeam == Fight.redTeam) + player.teleport(Config.TeamRedSpawn); + else + player.teleport(Config.TeamBlueSpawn); }