SteamWar/FightSystem
Archiviert
13
1
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-03-25 17:05:33 +01:00
Ursprung cd5399d1a8
Commit 872f57cff4
4 geänderte Dateien mit 9 neuen und 18 gelöschten Zeilen

Datei anzeigen

@ -336,7 +336,6 @@ public class FightSystem extends JavaPlugin {
} }
} }
Countdown.cancelAllTimers();
Countdown countdown = new Countdown(20*60, new FinishSpectateOver()); Countdown countdown = new Countdown(20*60, new FinishSpectateOver());
countdown.startTimer(FightSystem.getPlugin()); countdown.startTimer(FightSystem.getPlugin());
} }

Datei anzeigen

@ -19,7 +19,7 @@ public class PlayerDeathListener implements Listener {
if(Fight.getPlayerTeam(player) == null) return; if(Fight.getPlayerTeam(player) == null) return;
FightTeam fightTeam = Fight.getPlayerTeam(player); FightTeam fightTeam = Fight.getPlayerTeam(player);
fightTeam.getFightPlayer(player).setOut(true); fightTeam.getFightPlayer(player).setOut(true);
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Spieler §6" + player.getName() + " §cist gestorben!"); event.setDeathMessage(FightSystem.PREFIX + "§cDer Spieler §6" + player.getName() + " §cist gestorben!");
} }

Datei anzeigen

@ -6,8 +6,6 @@ import me.yaruma.fightsystem.fight.FightPlayer;
import me.yaruma.fightsystem.fight.FightState; import me.yaruma.fightsystem.fight.FightState;
import me.yaruma.fightsystem.fight.FightTeam; import me.yaruma.fightsystem.fight.FightTeam;
import me.yaruma.fightsystem.manager.FileManager; import me.yaruma.fightsystem.manager.FileManager;
import me.yaruma.fightsystem.utils.countdown.Countdown;
import me.yaruma.fightsystem.utils.countdown.FinishNoPlayersOnline;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -43,13 +41,8 @@ public class PlayerInteractListener implements Listener {
fightTeam.setReady(false); fightTeam.setReady(false);
break; break;
case "§4Abbrechen": case "§4Abbrechen":
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team von §a" + fightTeam.getLeader().getPlayer().getName() + " §6hat den Kampf abgebrochen! \n Server stoppt in 30 Sekunden..."); Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team von §a" + fightTeam.getLeader().getPlayer().getName() + " §6hat den Kampf abgebrochen! \n Server stoppt...");
player.getInventory().clear(); Bukkit.shutdown();
if(Fight.getOpposite(fightTeam).getLeader().getPlayer() != null) Fight.getOpposite(fightTeam).getLeader().getPlayer().getInventory().clear();
Countdown.cancelAllTimers();
Countdown countdown = new Countdown(30, new FinishNoPlayersOnline());
countdown.startTimer(instance);
break; break;
default: default:
event.setCancelled(true); event.setCancelled(true);

Datei anzeigen

@ -15,13 +15,12 @@ public class PlayerRespawnListener implements Listener {
public void handlePlayerRespawn(PlayerRespawnEvent event) { public void handlePlayerRespawn(PlayerRespawnEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if(Fight.getPlayerTeam(player) != null) { if(Fight.getPlayerTeam(player) != null) {
player.teleport(instance.getSpecSpawnLoc()); if(Fight.getPlayerTeam(player) == Fight.redTeam) {
} else { event.setRespawnLocation(instance.getTeam1SpawnLoc());
if(Fight.getPlayerTeam(player) == Fight.redTeam) } else
instance.getTeam1SpawnLoc(); event.setRespawnLocation(instance.getTeam2SpawnLoc());
else } else
instance.getTeam2SpawnLoc(); event.setRespawnLocation(instance.getSpecSpawnLoc());
}
} }