From 9f7e7645e9734aca48bd35caac69a8542518f212 Mon Sep 17 00:00:00 2001 From: devlrxxh Date: Sat, 6 Apr 2024 11:20:17 +0200 Subject: [PATCH] Added party events scoreboard and improved a ton more stuff --- .../commands/user/party/PartyCommand.java | 37 ++++++++- .../java/me/lrxh/practice/match/Match.java | 8 +- .../match/impl/BasicFreeForAllMatch.java | 18 +---- .../practice/match/impl/BasicTeamMatch.java | 75 ------------------- .../practice/match/task/MatchLogicTask.java | 5 +- .../java/me/lrxh/practice/party/Party.java | 4 +- .../me/lrxh/practice/party/PartyEvent.java | 7 +- .../me/lrxh/practice/party/PartyListener.java | 28 ------- .../party/menu/PartyEventSelectEventMenu.java | 17 ++++- .../party/menu/PartyEventSelectKitMenu.java | 16 +++- .../practice/profile/hotbar/HotbarItem.java | 4 +- .../scoreboard/ScoreboardAdapter.java | 11 ++- .../lrxh/practice/util/PlaceholderUtil.java | 23 ++++++ src/main/resources/menus.yml | 12 +-- src/main/resources/scoreboard.yml | 40 +++++++--- 15 files changed, 144 insertions(+), 161 deletions(-) diff --git a/src/main/java/me/lrxh/practice/commands/user/party/PartyCommand.java b/src/main/java/me/lrxh/practice/commands/user/party/PartyCommand.java index 3d79f73..5db567f 100644 --- a/src/main/java/me/lrxh/practice/commands/user/party/PartyCommand.java +++ b/src/main/java/me/lrxh/practice/commands/user/party/PartyCommand.java @@ -6,6 +6,8 @@ import me.lrxh.practice.Practice; import me.lrxh.practice.party.Party; import me.lrxh.practice.party.PartyPrivacy; +import me.lrxh.practice.party.menu.OtherPartiesMenu; +import me.lrxh.practice.party.menu.PartyEventSelectEventMenu; import me.lrxh.practice.profile.Profile; import me.lrxh.practice.profile.ProfileState; import me.lrxh.practice.util.CC; @@ -105,7 +107,6 @@ public void info(Player player) { } profile.getParty().sendInformation(player); - } @Syntax("") @@ -248,6 +249,40 @@ public void kick(Player player, String playerName) { profile.getParty().leave(target, true); } + @Subcommand("event") + public void event(Player player) { + Profile profile = Profile.getByUuid(player.getUniqueId()); + + if (profile.getParty() == null) { + player.sendMessage(CC.RED + "You do not have a party."); + return; + } + + if (!profile.getParty().getLeader().equals(player)) { + player.sendMessage(CC.RED + "You are not the leader of your party."); + return; + } + + new PartyEventSelectEventMenu().openMenu(player); + } + + @Subcommand("other") + public void other(Player player) { + Profile profile = Profile.getByUuid(player.getUniqueId()); + + if (profile.getParty() == null) { + player.sendMessage(CC.RED + "You do not have a party."); + return; + } + + if (!profile.getParty().getLeader().equals(player)) { + player.sendMessage(CC.RED + "You are not the leader of your party."); + return; + } + + new OtherPartiesMenu().openMenu(player); + } + @Subcommand("leave") public void leave(Player player) { Profile profile = Profile.getByUuid(player.getUniqueId()); diff --git a/src/main/java/me/lrxh/practice/match/Match.java b/src/main/java/me/lrxh/practice/match/Match.java index b3ec393..2acbefb 100644 --- a/src/main/java/me/lrxh/practice/match/Match.java +++ b/src/main/java/me/lrxh/practice/match/Match.java @@ -500,7 +500,9 @@ public void onDeath(Player dead) { PlayerUtil.animateDeath(dead); if (killer != null) { - PlayerUtil.sendTitle(dead, CC.translate("&cLOST!"), "&c" + killer.getName() + " &fwon the match!", 70); + PlayerUtil.sendTitle(dead, CC.translate("&cDEFEAT!"), "&a" + killer.getName() + " &7won the match!", 70); + } else { + PlayerUtil.sendTitle(dead, CC.translate("&cDEFEAT!"), "&aEnemy" + " &7won the match!", 70); } // Don't continue if the player is already dead @@ -515,7 +517,7 @@ public void onDeath(Player dead) { if (killer != null) { Profile killerProfile = Profile.getByUuid(killer.getUniqueId()); killerProfile.getOptions().killEffect().execute(killer, dead.getLocation()); - PlayerUtil.sendTitle(killer, CC.translate("&aVICTORY!"), "&a" + killer.getName() + " &fwon the match!", 70); + PlayerUtil.sendTitle(killer, CC.translate("&aVICTORY!"), "&aYou" + " &7won the match!", 70); killer.playSound(killer.getLocation(), Sound.EXPLODE, 1.0f, 1.0f); PlayerUtil.doVelocityChange(killer); } @@ -616,8 +618,6 @@ public MatchGamePlayer getGamePlayer(Player player) { public abstract ChatColor getRelationColor(Player viewer, Player target); - public abstract List getScoreboardLines(Player player); - public void addSpectator(Player spectator, Player target) { spectators.add(spectator.getUniqueId()); diff --git a/src/main/java/me/lrxh/practice/match/impl/BasicFreeForAllMatch.java b/src/main/java/me/lrxh/practice/match/impl/BasicFreeForAllMatch.java index 5d701c2..2354047 100644 --- a/src/main/java/me/lrxh/practice/match/impl/BasicFreeForAllMatch.java +++ b/src/main/java/me/lrxh/practice/match/impl/BasicFreeForAllMatch.java @@ -147,22 +147,6 @@ public org.bukkit.ChatColor getRelationColor(Player viewer, Player target) { } } - @Override - public List getScoreboardLines(Player player) { - List lines = new ArrayList<>(); - - if (getParticipant(player) != null) { - lines.add("&cDuration: &r" + getDuration()); - lines.add("&cOpponents: &r" + (getRemainingTeams() - 1)); - } else { - lines.add("&cKit: &7" + getKit().getName()); - lines.add("&cDuration: &7" + getDuration()); - lines.add("&cTeams: &7" + getRemainingTeams()); - } - - return lines; - } - @Override public void addSpectator(Player spectator, Player target) { super.addSpectator(spectator, target); @@ -204,7 +188,7 @@ public List generateEndComponents() { return componentsList; } - private int getRemainingTeams() { + public int getRemainingTeams() { int remaining = 0; for (GameParticipant gameParticipant : participants) { diff --git a/src/main/java/me/lrxh/practice/match/impl/BasicTeamMatch.java b/src/main/java/me/lrxh/practice/match/impl/BasicTeamMatch.java index 80bebae..2108101 100644 --- a/src/main/java/me/lrxh/practice/match/impl/BasicTeamMatch.java +++ b/src/main/java/me/lrxh/practice/match/impl/BasicTeamMatch.java @@ -7,14 +7,12 @@ import me.lrxh.practice.kit.Kit; import me.lrxh.practice.match.Match; import me.lrxh.practice.match.MatchSnapshot; -import me.lrxh.practice.match.MatchState; import me.lrxh.practice.match.participant.MatchGamePlayer; import me.lrxh.practice.participant.GameParticipant; import me.lrxh.practice.profile.Profile; import me.lrxh.practice.profile.meta.ProfileRematchData; import me.lrxh.practice.queue.Queue; import me.lrxh.practice.util.ChatComponentBuilder; -import me.lrxh.practice.util.TimeUtil; import me.lrxh.practice.util.elo.EloUtil; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.BaseComponent; @@ -220,79 +218,6 @@ public org.bukkit.ChatColor getRelationColor(Player viewer, Player target) { } } - @Override - public List getScoreboardLines(Player player) { - List lines = new ArrayList<>(); - - if (getParticipant(player) != null) { - if (state == MatchState.STARTING_ROUND || state == MatchState.PLAYING_ROUND) { - if (participantA.getPlayers().size() == 1 && participantB.getPlayers().size() == 1) { - GameParticipant opponent; - - if (participantA.containsPlayer(player.getUniqueId())) { - opponent = participantB; - } else { - opponent = participantA; - } - - lines.add("&cDuration: &r" + getDuration()); - lines.add("&cOpponent: &r" + opponent.getConjoinedNames()); - } else { - GameParticipant friendly = getParticipant(player); - GameParticipant opponent = participantA.equals(friendly) ? - participantB : participantA; - - if (friendly.getPlayers().size() + opponent.getPlayers().size() <= 6) { - lines.add("&cDuration: &7" + getDuration()); - lines.add(""); - lines.add("&aTeam &a(" + friendly.getAliveCount() + "/" + friendly.getPlayers().size() + ")"); - - for (MatchGamePlayer gamePlayer : friendly.getPlayers()) { - lines.add(" " + (gamePlayer.isDead() || gamePlayer.isDisconnected() ? "&7&m" : "") + - gamePlayer.getUsername()); - } - - lines.add(""); - lines.add("&cOpponents &c(" + opponent.getAliveCount() + "/" + opponent.getPlayers().size() + - ")"); - - for (MatchGamePlayer gamePlayer : opponent.getPlayers()) { - lines.add(" " + (gamePlayer.isDead() || gamePlayer.isDisconnected() ? "&7&m" : "") + - gamePlayer.getUsername()); - } - } else { - lines.add("&cDuration: &7" + getDuration()); - lines.add("&aTeam: &7" + friendly.getAliveCount() + "/" + friendly.getPlayers().size()); - lines.add("&cOpponents: &7" + opponent.getAliveCount() + "/" + opponent.getPlayers().size()); - } - } - } else { - lines.add("&cDuration: &7" + TimeUtil.millisToTimer(timeData)); - } - } else { - lines.add("&cKit: &7" + getKit().getName()); - lines.add("&cDuration: &7" + getDuration()); - lines.add(""); - - if (participantA.getPlayers().size() <= 2 && participantB.getPlayers().size() <= 2) { - for (MatchGamePlayer gamePlayer : participantA.getPlayers()) { - lines.add(gamePlayer.getUsername()); - } - - lines.add("vs"); - - for (MatchGamePlayer gamePlayer : participantB.getPlayers()) { - lines.add(gamePlayer.getUsername()); - } - } else { - lines.add(participantA.getLeader().getUsername() + "'s Team"); - lines.add(participantB.getLeader().getUsername() + "'s Team"); - } - } - - return lines; - } - @Override public void addSpectator(Player spectator, Player target) { super.addSpectator(spectator, target); diff --git a/src/main/java/me/lrxh/practice/match/task/MatchLogicTask.java b/src/main/java/me/lrxh/practice/match/task/MatchLogicTask.java index f29a0da..4f3474f 100644 --- a/src/main/java/me/lrxh/practice/match/task/MatchLogicTask.java +++ b/src/main/java/me/lrxh/practice/match/task/MatchLogicTask.java @@ -5,6 +5,7 @@ import me.lrxh.practice.Practice; import me.lrxh.practice.match.Match; import me.lrxh.practice.match.MatchState; +import me.lrxh.practice.match.impl.BasicTeamMatch; import me.lrxh.practice.match.participant.MatchGamePlayer; import me.lrxh.practice.participant.GameParticipant; import me.lrxh.practice.participant.GamePlayer; @@ -32,7 +33,7 @@ public void run() { } nextAction--; if (match.getState() == MatchState.STARTING_ROUND) { - if (match.getKit().getGameRules().isSumo() || match.getKit().getGameRules().isBedwars()) { + if (match.getKit().getGameRules().isSumo() || match.getKit().getGameRules().isBedwars() || match instanceof BasicTeamMatch) { for (GameParticipant gameParticipant : match.getParticipants()) { for (GamePlayer gamePlayer : gameParticipant.getPlayers()) { PlayerUtil.denyMovement(gamePlayer.getPlayer()); @@ -46,7 +47,7 @@ public void run() { match.sendMessage(" "); match.sendMessage(Locale.MATCH_WARNING.format()); - if (match.getKit().getGameRules().isSumo() || match.getKit().getGameRules().isBedwars()) { + if (match.getKit().getGameRules().isSumo() || match.getKit().getGameRules().isBedwars() || match instanceof BasicTeamMatch) { for (GameParticipant gameParticipant : match.getParticipants()) { for (GamePlayer gamePlayer : gameParticipant.getPlayers()) { PlayerUtil.allowMovement(gamePlayer.getPlayer()); diff --git a/src/main/java/me/lrxh/practice/party/Party.java b/src/main/java/me/lrxh/practice/party/Party.java index c5a0069..777b15f 100644 --- a/src/main/java/me/lrxh/practice/party/Party.java +++ b/src/main/java/me/lrxh/practice/party/Party.java @@ -153,9 +153,7 @@ public void disband() { // Remove any party duel requests Profile leaderProfile = Profile.getByUuid(leader.getUniqueId()); - if (leaderProfile != null) { - leaderProfile.getDuelRequests().removeIf(DuelRequest::isParty); - } + leaderProfile.getDuelRequests().removeIf(DuelRequest::isParty); // Reset player profiles for (Player player : getListOfPlayers()) { diff --git a/src/main/java/me/lrxh/practice/party/PartyEvent.java b/src/main/java/me/lrxh/practice/party/PartyEvent.java index f39d614..1875acb 100644 --- a/src/main/java/me/lrxh/practice/party/PartyEvent.java +++ b/src/main/java/me/lrxh/practice/party/PartyEvent.java @@ -7,9 +7,8 @@ @Getter public enum PartyEvent { - FFA("FFA"), - SPLIT("Split"); - - private String name; + FFA("Party FFA"), + SPLIT("Party Split"); + private final String name; } diff --git a/src/main/java/me/lrxh/practice/party/PartyListener.java b/src/main/java/me/lrxh/practice/party/PartyListener.java index 1b4b490..b4bc29e 100644 --- a/src/main/java/me/lrxh/practice/party/PartyListener.java +++ b/src/main/java/me/lrxh/practice/party/PartyListener.java @@ -1,17 +1,11 @@ package me.lrxh.practice.party; -import me.lrxh.practice.Practice; -import me.lrxh.practice.party.menu.OtherPartiesMenu; -import me.lrxh.practice.party.menu.PartyEventSelectEventMenu; import me.lrxh.practice.profile.Profile; -import me.lrxh.practice.profile.hotbar.HotbarItem; import org.bukkit.ChatColor; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.Action; import org.bukkit.event.player.AsyncPlayerChatEvent; -import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; public class PartyListener implements Listener { @@ -28,28 +22,6 @@ public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent event) { } } - @EventHandler(priority = EventPriority.HIGH) - public void onPlayerInteractEvent(PlayerInteractEvent event) { - if (event.getItem() != null && (event.getAction() == Action.RIGHT_CLICK_AIR || - event.getAction() == Action.RIGHT_CLICK_BLOCK)) { - HotbarItem hotbarItem = Practice.getInstance().getHotbar().fromItemStack(event.getItem()); - - if (hotbarItem != null) { - boolean cancelled = true; - - if (hotbarItem == HotbarItem.PARTY_EVENTS) { - new PartyEventSelectEventMenu().openMenu(event.getPlayer()); - } else if (hotbarItem == HotbarItem.OTHER_PARTIES) { - new OtherPartiesMenu().openMenu(event.getPlayer()); - } else { - cancelled = false; - } - - event.setCancelled(cancelled); - } - } - } - @EventHandler(priority = EventPriority.LOW) public void onPlayerQuitEvent(PlayerQuitEvent event) { Profile profile = Profile.getProfiles().get(event.getPlayer().getUniqueId()); diff --git a/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectEventMenu.java b/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectEventMenu.java index 8bfaa6c..77fe88f 100644 --- a/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectEventMenu.java +++ b/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectEventMenu.java @@ -14,7 +14,9 @@ import org.bukkit.event.inventory.ClickType; import org.bukkit.inventory.ItemStack; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; public class PartyEventSelectEventMenu extends Menu { @@ -49,8 +51,21 @@ private static class SelectEventButton extends Button { @Override public ItemStack getButtonItem(Player player) { - return new ItemBuilder(partyEvent == PartyEvent.FFA ? Material.QUARTZ : Material.REDSTONE) + List splitLore = new ArrayList<>(); + splitLore.add(CC.translate("&7Split your party into")); + splitLore.add(CC.translate("&72 teams and fight.")); + splitLore.add(CC.translate("")); + splitLore.add(CC.translate("&aClick to host!")); + + List ffaLore = new ArrayList<>(); + ffaLore.add(CC.translate("&7Everybody in the party")); + ffaLore.add(CC.translate("&7fights everybody else.")); + ffaLore.add(CC.translate("")); + ffaLore.add(CC.translate("&aClick to host!")); + + return new ItemBuilder(partyEvent == PartyEvent.FFA ? Material.DIAMOND_SWORD : Material.GOLD_AXE) .name(Practice.getInstance().getMenusConfig().getString("PARTY.EVENTS.EVENT-COLOR").replace("", partyEvent.getName())) + .lore(partyEvent == PartyEvent.FFA ? ffaLore : splitLore) .clearFlags() .build(); } diff --git a/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectKitMenu.java b/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectKitMenu.java index 02c7c4c..39d0c4c 100644 --- a/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectKitMenu.java +++ b/src/main/java/me/lrxh/practice/party/menu/PartyEventSelectKitMenu.java @@ -17,6 +17,7 @@ import me.lrxh.practice.util.ItemBuilder; import me.lrxh.practice.util.menu.Button; import me.lrxh.practice.util.menu.Menu; +import me.lrxh.practice.util.menu.filters.Filters; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; @@ -34,13 +35,24 @@ public String getTitle(Player player) { return Practice.getInstance().getMenusConfig().getString("PARTY.EVENTS.SELECT-KIT.TITLE"); } + @Override + public Filters getFilter() { + return Filters.valueOf(Practice.getInstance().getMenusConfig().getString("PARTY.EVENTS.FILTER")); + } + + + public int getSize() { + return Practice.getInstance().getMenusConfig().getInteger("PARTY.EVENTS.SELECT-KIT.SIZE"); + } + @Override public Map getButtons(Player player) { Map buttons = new HashMap<>(); + int i = 10; for (Kit kit : Kit.getKits()) { if (kit.isEnabled()) { - buttons.put(buttons.size(), new SelectKitButton(partyEvent, kit)); + buttons.put(i++, new SelectKitButton(partyEvent, kit)); } } @@ -56,7 +68,7 @@ private static class SelectKitButton extends Button { @Override public ItemStack getButtonItem(Player player) { return new ItemBuilder(kit.getDisplayIcon()) - .name("&6" + kit.getName()) + .name(Practice.getInstance().getMenusConfig().getString("PARTY.EVENTS.SELECT-KIT.KIT-NAME").replace("", kit.getName())) .clearFlags() .build(); } diff --git a/src/main/java/me/lrxh/practice/profile/hotbar/HotbarItem.java b/src/main/java/me/lrxh/practice/profile/hotbar/HotbarItem.java index bc1f2ae..04f09e5 100644 --- a/src/main/java/me/lrxh/practice/profile/hotbar/HotbarItem.java +++ b/src/main/java/me/lrxh/practice/profile/hotbar/HotbarItem.java @@ -12,14 +12,14 @@ public enum HotbarItem { QUEUE_JOIN_RANKED(null), QUEUE_JOIN_UNRANKED(null), QUEUE_LEAVE(null), - PARTY_EVENTS(null), + PARTY_EVENTS("party event"), SETTINGS("settings"), PROFILE_SETTINGS("profilesettings"), PARTY_CREATE("party create"), PARTY_DISBAND("party disband"), PARTY_LEAVE("party leave"), PARTY_INFORMATION("party info"), - OTHER_PARTIES(null), + OTHER_PARTIES("party other"), KIT_EDITOR(null), SPECTATE_STOP("spec leave"), VIEW_INVENTORY(null), diff --git a/src/main/java/me/lrxh/practice/scoreboard/ScoreboardAdapter.java b/src/main/java/me/lrxh/practice/scoreboard/ScoreboardAdapter.java index aa23272..e971674 100644 --- a/src/main/java/me/lrxh/practice/scoreboard/ScoreboardAdapter.java +++ b/src/main/java/me/lrxh/practice/scoreboard/ScoreboardAdapter.java @@ -3,6 +3,8 @@ import me.lrxh.practice.Practice; import me.lrxh.practice.match.Match; import me.lrxh.practice.match.MatchState; +import me.lrxh.practice.match.impl.BasicFreeForAllMatch; +import me.lrxh.practice.match.impl.BasicTeamMatch; import me.lrxh.practice.profile.Profile; import me.lrxh.practice.profile.ProfileState; import me.lrxh.practice.queue.QueueProfile; @@ -14,7 +16,6 @@ import java.util.List; public class ScoreboardAdapter implements AssembleAdapter { - private int index; public String getTitle(Player player) { ArrayList list = new ArrayList<>(); @@ -28,7 +29,7 @@ public List getLines(Player player) { if (profile.getState() == ProfileState.LOBBY) { if (profile.getParty() != null) { - return PlaceholderUtil.format(new ArrayList<>(Practice.getInstance().getScoreboardConfig().getStringList("IN-PARTY")), player); + return PlaceholderUtil.format(new ArrayList<>(Practice.getInstance().getScoreboardConfig().getStringList("IN-PARTY.LOBBY")), player); } return PlaceholderUtil.format(new ArrayList<>(Practice.getInstance().getScoreboardConfig().getStringList("LOBBY")), player); } @@ -49,6 +50,12 @@ public List getLines(Player player) { if (profile.getMatch() != null) { Match match = profile.getMatch(); + if (match instanceof BasicTeamMatch) { + return PlaceholderUtil.format(new ArrayList<>(Practice.getInstance().getScoreboardConfig().getStringList("IN-PARTY.IN-SPLIT-MATCH")), player); + } + if (match instanceof BasicFreeForAllMatch) { + return PlaceholderUtil.format(new ArrayList<>(Practice.getInstance().getScoreboardConfig().getStringList("IN-PARTY.IN-FFA-MATCH")), player); + } if (match.getState().equals(MatchState.STARTING_ROUND)) { return PlaceholderUtil.format(new ArrayList<>(Practice.getInstance().getScoreboardConfig().getStringList("MATCH.STARTING")), player); } diff --git a/src/main/java/me/lrxh/practice/util/PlaceholderUtil.java b/src/main/java/me/lrxh/practice/util/PlaceholderUtil.java index 92bda29..d5393cc 100644 --- a/src/main/java/me/lrxh/practice/util/PlaceholderUtil.java +++ b/src/main/java/me/lrxh/practice/util/PlaceholderUtil.java @@ -4,6 +4,10 @@ import me.clip.placeholderapi.PlaceholderAPI; import me.lrxh.practice.Practice; import me.lrxh.practice.match.Match; +import me.lrxh.practice.match.impl.BasicFreeForAllMatch; +import me.lrxh.practice.match.impl.BasicTeamMatch; +import me.lrxh.practice.match.participant.MatchGamePlayer; +import me.lrxh.practice.participant.GameParticipant; import me.lrxh.practice.profile.Profile; import me.lrxh.practice.profile.ProfileState; import me.lrxh.practice.queue.QueueProfile; @@ -59,7 +63,26 @@ public static List format(List lines, Player player) { } Match match = profile.getMatch(); if (match != null) { + if (match instanceof BasicTeamMatch) { + GameParticipant participantA = match.getParticipantA(); + GameParticipant participantB = match.getParticipantB(); + + boolean aTeam = match.getParticipantA().containsPlayer(player.getUniqueId()); + GameParticipant playerTeam = aTeam ? participantA : participantB; + GameParticipant opponentTeam = aTeam ? participantB : participantA; + + line = line.replaceAll("", String.valueOf(opponentTeam.getAliveCount())) + .replaceAll("", String.valueOf(opponentTeam.getPlayers().size())) + .replaceAll("", String.valueOf(playerTeam.getAliveCount())) + .replaceAll("", String.valueOf(playerTeam.getPlayers().size())); + } + if (match instanceof BasicFreeForAllMatch) { + BasicFreeForAllMatch basicFreeForAllMatch = (BasicFreeForAllMatch) match; + line = line.replaceAll("", String.valueOf(basicFreeForAllMatch.getRemainingTeams())); + } + if (match.getOpponent(player.getUniqueId()) != null) { + line = line.replaceAll("", getDifference(player)); line = line.replaceAll("", match.getOpponent(player.getUniqueId()).getName()); line = line.replaceAll("", match.getDuration()); line = line.replaceAll("", String.valueOf(BukkitReflection.getPing(match.getOpponent(player.getUniqueId())))); diff --git a/src/main/resources/menus.yml b/src/main/resources/menus.yml index fc62b38..0cc8856 100644 --- a/src/main/resources/menus.yml +++ b/src/main/resources/menus.yml @@ -44,6 +44,8 @@ PARTY: EVENT-COLOR: "&b" SELECT-KIT: TITLE: "&7Select a Kit" + SIZE: 27 + KIT-NAME: "&b" OTHER-PARTIES: TITLE: "&7Other Parties" SIZE: 27 @@ -128,12 +130,4 @@ LEADERBOARD: LORE: - " &7* &fWins: &b" - " &7* &fLoses: &b" - - " &7* &fElo: &b" -SHOP-MENU: - TITLE: "&7Coin shop" - SIZE: 27 - FILTER: FILL # THERE IS FILL AND BRODER -SHOP: - TITLE: "&7Coin shop" - SIZE: 27 - FILTER: FILL # THERE IS FILL AND BRODER \ No newline at end of file + - " &7* &fElo: &b" \ No newline at end of file diff --git a/src/main/resources/scoreboard.yml b/src/main/resources/scoreboard.yml index ebb1d21..c7ed883 100644 --- a/src/main/resources/scoreboard.yml +++ b/src/main/resources/scoreboard.yml @@ -22,17 +22,35 @@ LOBBY: - "server.net" - "&7&m--------------------" IN-PARTY: - - "&7&m--------------------" - - "&fOnline: " - - "&fIn Fights: " - - "&fIn Queue: " - - " " - - "Party:" - - " • &fLeader: " - - " • &fSize: " - - "" - - "server.net" - - "&7&m--------------------" + LOBBY: + - "&7&m--------------------" + - "&fOnline: " + - "&fIn Fights: " + - "&fIn Queue: " + - " " + - "Party:" + - " • &fLeader: " + - " • &fSize: " + - "" + - "server.net" + - "&7&m--------------------" + IN-SPLIT-MATCH: + - "&7&m--------------------" + - "Duration: &f" + - "Opponents: &f/" + - "Team: &f/" + - "" + - "&aYour Ping: &fms" + - "" + - "server.net" + - "&7&m--------------------" + IN-FFA-MATCH: + - "&7&m--------------------" + - "Remaning: &f" + - "Your Ping: &fms" + - "" + - "lunar.gg" + - "&7&m--------------------" QUEUE: UNRANKED: - "&7&m--------------------"