e
This commit is contained in:
parent
86413e60a0
commit
bf339a4b07
@ -82,42 +82,37 @@ public class QueueManager {
|
||||
|
||||
Player opponentPlayer = Bukkit.getPlayer(opponent);
|
||||
|
||||
List<UUID> playersA = new ArrayList<>();
|
||||
List<UUID> playersB = new ArrayList<>();
|
||||
|
||||
playersA.add(player.getUniqueId());
|
||||
playersB.add(opponent);
|
||||
|
||||
GameTeam teamA = new GameTeam(player.getUniqueId(), playersA, 0, PlayerTeam.RED);
|
||||
GameTeam teamB = new GameTeam(player.getUniqueId(), playersB, 1, PlayerTeam.LIME);
|
||||
GameTeam teamA = new GameTeam(player.getUniqueId(), Collections.singletonList(player.getUniqueId()), 0, PlayerTeam.RED);
|
||||
GameTeam teamB = new GameTeam(player.getUniqueId(), Collections.singletonList(opponentPlayer.getUniqueId()), 1, PlayerTeam.LIME);
|
||||
|
||||
Arena arena = this.plugin.getArenaManager().getRandomArena();
|
||||
|
||||
if (this.getQueueSizeByType(gameType) >= gameType.getQueueAmount()) {
|
||||
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⚫ &fGame: &d" + gameType.getName()));
|
||||
player.sendMessage(" ");
|
||||
|
||||
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⚫ &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⚫ &fGame: &d" + gameType.getName()));
|
||||
opponentPlayer.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⚫ &fGame: &d" + gameType.getName()));
|
||||
opponentPlayer.sendMessage(" ");
|
||||
Game game = new Game(arena, gameType, teamA, teamB);
|
||||
this.plugin.getGameManager().createGame(game);
|
||||
|
||||
Game game = new Game(arena, gameType, teamA, teamB);
|
||||
this.plugin.getGameManager().createGame(game);
|
||||
this.queued.remove(player.getUniqueId());
|
||||
this.queued.remove(opponentPlayer.getUniqueId());
|
||||
|
||||
this.queued.remove(player.getUniqueId());
|
||||
this.queued.remove(opponentPlayer.getUniqueId());
|
||||
this.queueTime.remove(player.getUniqueId());
|
||||
this.queueTime.remove(opponentPlayer.getUniqueId());
|
||||
|
||||
this.queueTime.remove(player.getUniqueId());
|
||||
this.queueTime.remove(opponentPlayer.getUniqueId());
|
||||
}
|
||||
// if (this.getQueueSizeByType(gameType) >= gameType.getQueueAmount()) {
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,18 +115,18 @@ public class ScoreboardProvider implements AssembleAdapter {
|
||||
lines.add("&fDuration: &d" + game.getDuration());
|
||||
lines.add(" ");
|
||||
if (yourTeam.isHasBed()) {
|
||||
lines.add("&f7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &a&l✓ &7(You)");
|
||||
lines.add("&7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &a&l✓ &7(You)");
|
||||
} else if (yourTeam.getPlayingPlayers().size() > 0) {
|
||||
lines.add("&f7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &f" + yourTeam.getPlayingPlayers().size() + " &7(YOU)");
|
||||
lines.add("&7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &f" + yourTeam.getPlayingPlayers().size() + " &7(YOU)");
|
||||
} else {
|
||||
lines.add("&f7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &c&l✗ &7(You)");
|
||||
lines.add("&7" + yourTeam.getPlayerTeam().getChatColor() + yourTeam.getPlayerTeam().getSmallName() + "&7] &c&l✗ &7(You)");
|
||||
}
|
||||
if (opposingTeam.isHasBed()) {
|
||||
lines.add("&f7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &a&l✓");
|
||||
lines.add("&7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &a&l✓");
|
||||
} else if (opposingTeam.getPlayingPlayers().size() > 0) {
|
||||
lines.add("&f7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &f" + yourTeam.getPlayingPlayers().size());
|
||||
lines.add("&7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &f" + yourTeam.getPlayingPlayers().size());
|
||||
} else {
|
||||
lines.add("&f7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &c&l✗");
|
||||
lines.add("&7" + opposingTeam.getPlayerTeam().getChatColor() + opposingTeam.getPlayerTeam().getSmallName() + "&7] &c&l✗");
|
||||
}
|
||||
lines.add(" ");
|
||||
lines.add("&fKills: &d" + playerData.getGameKills());
|
||||
|
Loading…
Reference in New Issue
Block a user