??
This commit is contained in:
parent
16213e44d0
commit
abaa4828dc
@ -35,7 +35,7 @@ public class GameEndListener implements Listener {
|
||||
playerData.setGameKills(0);
|
||||
|
||||
String winnerTitle = CC.translate("&aVICTORY!");
|
||||
String losingTitle = CC.translate("&aDEFEAT!");
|
||||
String losingTitle = CC.translate("&cDEFEAT!");
|
||||
String subTitle = CC.translate(winningTeam.getPlayerTeam().getChatColor() + winningTeam.getPlayerTeam().getName() + " &fhas won the game!");
|
||||
|
||||
if (winningTeam.getAllPlayers().contains(player.getUniqueId())) {
|
||||
|
@ -34,6 +34,10 @@ public class MovementListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerData.getPlayerState() == PlayerState.RESPAWNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.isInGame(playerData)) {
|
||||
return;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import rip.tilly.bedwars.events.PlayerKillEvent;
|
||||
import rip.tilly.bedwars.game.Game;
|
||||
import rip.tilly.bedwars.game.GameTeam;
|
||||
import rip.tilly.bedwars.playerdata.PlayerData;
|
||||
import rip.tilly.bedwars.playerdata.PlayerState;
|
||||
import rip.tilly.bedwars.runnables.RespawnRunnable;
|
||||
|
||||
public class PlayerKillListener implements Listener {
|
||||
@ -32,6 +33,7 @@ public class PlayerKillListener implements Listener {
|
||||
|
||||
GameTeam playerTeam = game.getTeams().get(playerData.getTeamId());
|
||||
if (playerTeam.isHasBed()) {
|
||||
playerData.setPlayerState(PlayerState.RESPAWNING);
|
||||
if (killer != null) {
|
||||
PlayerData killerData = this.plugin.getPlayerDataManager().getPlayerData(killer.getUniqueId());
|
||||
game.broadcast(playerData.getPlayerTeam().getChatColor() + player.getName() + " &ewas killed by " + killerData.getPlayerTeam().getChatColor() + killer.getName() + "&e!");
|
||||
|
@ -52,6 +52,9 @@ public class RespawnRunnable extends BukkitRunnable {
|
||||
this.player.setFoodLevel(20);
|
||||
this.playerData.setLastDamager(null);
|
||||
|
||||
this.player.setAllowFlight(false);
|
||||
this.player.setFlying(false);
|
||||
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user