bug fixes
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
cd5399d1a8
Commit
872f57cff4
@ -336,7 +336,6 @@ public class FightSystem extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
Countdown.cancelAllTimers();
|
||||
Countdown countdown = new Countdown(20*60, new FinishSpectateOver());
|
||||
countdown.startTimer(FightSystem.getPlugin());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class PlayerDeathListener implements Listener {
|
||||
if(Fight.getPlayerTeam(player) == null) return;
|
||||
FightTeam fightTeam = Fight.getPlayerTeam(player);
|
||||
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!");
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,8 +6,6 @@ import me.yaruma.fightsystem.fight.FightPlayer;
|
||||
import me.yaruma.fightsystem.fight.FightState;
|
||||
import me.yaruma.fightsystem.fight.FightTeam;
|
||||
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.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -43,13 +41,8 @@ public class PlayerInteractListener implements Listener {
|
||||
fightTeam.setReady(false);
|
||||
break;
|
||||
case "§4Abbrechen":
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team von §a" + fightTeam.getLeader().getPlayer().getName() + " §6hat den Kampf abgebrochen! \n Server stoppt in 30 Sekunden...");
|
||||
player.getInventory().clear();
|
||||
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);
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team von §a" + fightTeam.getLeader().getPlayer().getName() + " §6hat den Kampf abgebrochen! \n Server stoppt...");
|
||||
Bukkit.shutdown();
|
||||
break;
|
||||
default:
|
||||
event.setCancelled(true);
|
||||
|
@ -15,13 +15,12 @@ public class PlayerRespawnListener implements Listener {
|
||||
public void handlePlayerRespawn(PlayerRespawnEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
if(Fight.getPlayerTeam(player) != null) {
|
||||
player.teleport(instance.getSpecSpawnLoc());
|
||||
} else {
|
||||
if(Fight.getPlayerTeam(player) == Fight.redTeam)
|
||||
instance.getTeam1SpawnLoc();
|
||||
else
|
||||
instance.getTeam2SpawnLoc();
|
||||
}
|
||||
if(Fight.getPlayerTeam(player) == Fight.redTeam) {
|
||||
event.setRespawnLocation(instance.getTeam1SpawnLoc());
|
||||
} else
|
||||
event.setRespawnLocation(instance.getTeam2SpawnLoc());
|
||||
} else
|
||||
event.setRespawnLocation(instance.getSpecSpawnLoc());
|
||||
}
|
||||
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren