Merge branch 'main' of https://github.com/Lucanius69/BedWars
This commit is contained in:
commit
ca25dba731
@ -56,12 +56,14 @@ public class MovementListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (from.getBlockY() <= game.getArena().getDeadZone() && game.getGameState() != GameState.ENDING && playerData.getPlayerState() != PlayerState.RESPAWNING) {
|
||||
Player killer = playerData.getLastDamager();
|
||||
if (killer != null) {
|
||||
this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, killer));
|
||||
} else {
|
||||
this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, null));
|
||||
if (playerData.getPlayerState() != PlayerState.RESPAWNING && game.getGameState() != GameState.ENDING) {
|
||||
if (player.getLocation().getY() <= game.getArena().getDeadZone()) {
|
||||
Player killer = playerData.getLastDamager();
|
||||
if (killer != null) {
|
||||
this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, killer));
|
||||
} else {
|
||||
this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,14 +98,14 @@ public class QueueManager {
|
||||
player.sendMessage(" ");
|
||||
player.sendMessage(CC.translate("&aGame found!"));
|
||||
player.sendMessage(CC.translate("&7⚫ &fOpponent: &d" + opponentPlayer.getName()));
|
||||
//player.sendMessage(CC.translate("&7⚫ &fArena: &d" + arena.getName()));
|
||||
player.sendMessage(CC.translate("&7⚫ &fArena: &d" + arena.getName()));
|
||||
player.sendMessage(CC.translate("&7⚫ &fGame: &d" + gameType.getName()));
|
||||
player.sendMessage(" ");
|
||||
|
||||
opponentPlayer.sendMessage(" ");
|
||||
opponentPlayer.sendMessage(CC.translate("&aGame found!"));
|
||||
opponentPlayer.sendMessage(CC.translate("&7⚫ &fOpponent: &d" + player.getName()));
|
||||
//opponentPlayer.sendMessage(CC.translate("&7⚫ &fArena: &d" + arena.getName()));
|
||||
opponentPlayer.sendMessage(CC.translate("&7⚫ &fArena: &d" + arena.getName()));
|
||||
opponentPlayer.sendMessage(CC.translate("&7⚫ &fGame: &d" + gameType.getName()));
|
||||
opponentPlayer.sendMessage(" ");
|
||||
|
||||
|
@ -76,6 +76,7 @@ public class ScoreboardProvider implements AssembleAdapter {
|
||||
|
||||
lines.add("&fOnline: &d" + this.main.getServer().getOnlinePlayers().size());
|
||||
lines.add("&fPlaying: &d" + this.main.getGameManager().getPlaying());
|
||||
lines.add("&fQueueing: &d" + this.main.getQueueManager().getAllQueueSize());
|
||||
|
||||
lines.add(" ");
|
||||
|
||||
@ -114,22 +115,22 @@ public class ScoreboardProvider implements AssembleAdapter {
|
||||
lines.add("&fDuration: &d" + game.getDuration());
|
||||
lines.add(" ");
|
||||
if (yourTeam.isHasBed()) {
|
||||
lines.add("&f[" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&f] &a&l✓ &7(YOU)");
|
||||
lines.add("&f7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &a&l✓ &7(You)");
|
||||
} else if (yourTeam.getPlayingPlayers().size() > 0) {
|
||||
lines.add("&f[" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&f] &7" + yourTeam.getPlayingPlayers().size() + " &7(YOU)");
|
||||
lines.add("&f7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &f" + yourTeam.getPlayingPlayers().size() + " &7(YOU)");
|
||||
} else {
|
||||
lines.add("&f[" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&f] &c&l✗ &7(YOU)");
|
||||
lines.add("&f7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &c&l✗ &7(You)");
|
||||
}
|
||||
if (opposingTeam.isHasBed()) {
|
||||
lines.add("&f[" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&f] &a&l✓");
|
||||
lines.add("&f7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &a&l✓");
|
||||
} else if (opposingTeam.getPlayingPlayers().size() > 0) {
|
||||
lines.add("&f[" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&f] &7" + yourTeam.getPlayingPlayers().size());
|
||||
lines.add("&f7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &f" + yourTeam.getPlayingPlayers().size());
|
||||
} else {
|
||||
lines.add("&f[" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&f] &c&l✗");
|
||||
lines.add("&f7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &c&l✗");
|
||||
}
|
||||
lines.add(" ");
|
||||
lines.add("&fKills: &d" + playerData.getGameKills());
|
||||
lines.add("&fBeds Destroyed: &d");
|
||||
lines.add("&fBeds Destroyed: &d" + playerData.getGameBedsDestroyed());
|
||||
lines.add(" ");
|
||||
lines.add("&dtilly.rip");
|
||||
lines.add(CC.scoreboardBar);
|
||||
|
@ -31,6 +31,10 @@ public class RespawnRunnable extends BukkitRunnable {
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
if (this.playerData.getPlayerState() != PlayerState.RESPAWNING || this.playerData.getPlayerState() != PlayerState.PLAYING) {
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.respawnTime <= 1) {
|
||||
this.playerData.setPlayerState(PlayerState.PLAYING);
|
||||
|
Loading…
Reference in New Issue
Block a user