This commit is contained in:
Luca 2021-11-22 16:58:32 +01:00
parent 379788b7c3
commit bfdd2460ab
3 changed files with 18 additions and 15 deletions

View File

@ -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));
}
}
}
}

View File

@ -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(" ");

View File

@ -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);