board stuff

This commit is contained in:
Matheus 2024-06-15 09:19:42 -04:00
parent 9773f3e68e
commit 5e638672d9
2 changed files with 291 additions and 140 deletions

View File

@ -36,7 +36,7 @@ public class BoardAdapter implements AssembleAdapter {
case OLD:
return CC.GOLD + CC.BOLD + (!Practice.getInstance().isHolanda() ? "Battle " + CC.GRAY + "" + CC.WHITE + " Practice" : "Practice");
case MODERN:
return CC.GOLD + CC.BOLD + " Practice";
return CC.GOLD + CC.BOLD + "Practice";
default:
return "";
}
@ -87,11 +87,11 @@ public class BoardAdapter implements AssembleAdapter {
switch (playerData.getOptions().getScoreboardStyle()) {
case MODERN:
lines.add("");
lines.add(CC.GOLD + (Practice.getInstance().isHolanda() ? CC.translate(Animation.getScoreboardFooter()) : "battle.land") + " " + CC.GRAY + " " + CC.GRAY + " ");
lines.add(CC.GOLD + (Practice.getInstance().isHolanda() ? "wtap.gg" : "battle.land") + " " + CC.GRAY + " " + CC.GRAY + " ");
break;
case OLD:
lines.add("");
lines.add(CC.GOLD + (Practice.getInstance().isHolanda() ? CC.translate(Animation.getScoreboardFooter()) : "battle.land"));
lines.add(CC.GOLD + (Practice.getInstance().isHolanda() ? "wtap.gg" : "battle.land"));
lines.add(CC.SB_LINE);
break;
}

View File

@ -33,155 +33,306 @@ public class PracticeSettingsImpl implements ISettings {
public List<Button> getButtons(Player player) {
final List<Button> buttonList = new ArrayList<>();
final PlayerData data = Practice.getInstance().getPlayerManager().getPlayerData(player.getUniqueId());
if (!Practice.getInstance().isHolanda()) {
buttonList.add(new ItemBuilder(Material.SIGN)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Score")
.addLore(
"",
CC.GRAY + "você gostaria de deixar",
CC.GRAY + "score ativa ou desativada no spawn",
CC.GRAY + "um em uma partida?",
" ",
(data.getOptions().isScoreboardEnabled() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isScoreboardEnabled() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setScoreboardEnabled(!data.getOptions().isScoreboardEnabled()))
);
buttonList.add(new ItemBuilder(Material.SIGN)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Score")
.addLore(
"",
CC.GRAY + "você gostaria de deixar",
CC.GRAY + "score ativa ou desativada no spawn",
CC.GRAY + "um em uma partida?",
" ",
(data.getOptions().isScoreboardEnabled() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isScoreboardEnabled() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setScoreboardEnabled(!data.getOptions().isScoreboardEnabled()))
);
buttonList.add(new ItemBuilder(Material.ITEM_FRAME)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Estilo de Scoreboard")
.addLore(
"",
CC.GRAY + "Qual estilo de Scoreboard",
CC.GRAY + "você gostaria de ver",
CC.GRAY + "durante a fight?",
" ",
(data.getOptions().getScoreboardState().name().equals("PING") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fPing",
(data.getOptions().getScoreboardState().name().equals("ARENA") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fArena",
(data.getOptions().getScoreboardState().name().equals("LADDER") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fLadder",
(data.getOptions().getScoreboardState().name().equals("DURATION") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDuration"
)
.toUpdatingButton((player1, clickType) -> {
switch (data.getOptions().getScoreboardState()) {
case PING:
data.getOptions().setScoreboardState(ProfileOptionsItemState.ARENA);
break;
case ARENA:
data.getOptions().setScoreboardState(ProfileOptionsItemState.LADDER);
break;
case LADDER:
data.getOptions().setScoreboardState(ProfileOptionsItemState.DURATION);
break;
buttonList.add(new ItemBuilder(Material.ITEM_FRAME)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Estilo de Scoreboard")
.addLore(
"",
CC.GRAY + "Qual estilo de Scoreboard",
CC.GRAY + "você gostaria de ver",
CC.GRAY + "durante a fight?",
" ",
(data.getOptions().getScoreboardState().name().equals("PING") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fPing",
(data.getOptions().getScoreboardState().name().equals("ARENA") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fArena",
(data.getOptions().getScoreboardState().name().equals("LADDER") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fLadder",
(data.getOptions().getScoreboardState().name().equals("DURATION") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDuration"
)
.toUpdatingButton((player1, clickType) -> {
switch (data.getOptions().getScoreboardState()) {
case PING:
data.getOptions().setScoreboardState(ProfileOptionsItemState.ARENA);
break;
case ARENA:
data.getOptions().setScoreboardState(ProfileOptionsItemState.LADDER);
break;
case LADDER:
data.getOptions().setScoreboardState(ProfileOptionsItemState.DURATION);
break;
default:
data.getOptions().setScoreboardState(ProfileOptionsItemState.PING);
break;
}
})
);
default:
data.getOptions().setScoreboardState(ProfileOptionsItemState.PING);
break;
}
})
);
buttonList.add(new ItemBuilder(Material.PAINTING)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Linhas da Score")
.addLore(
"",
CC.GRAY + "Você gostaria de um estilo diferente",
CC.GRAY + "na sua Scoreboard?",
" ",
(data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.OLD ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fOld",
(data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.MODERN ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fModern"
)
.toUpdatingButton((player1, clickType) -> {
if (data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.MODERN) {
data.getOptions().setScoreboardStyle(SidebarOptionsItemState.OLD);
} else {
data.getOptions().setScoreboardStyle(SidebarOptionsItemState.MODERN);
}
})
);
buttonList.add(new ItemBuilder(Material.PAINTING)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Linhas da Score")
.addLore(
"",
CC.GRAY + "Você gostaria de um estilo diferente",
CC.GRAY + "na sua Scoreboard?",
" ",
(data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.OLD ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fOld",
(data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.MODERN ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fModern"
)
.toUpdatingButton((player1, clickType) -> {
if (data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.MODERN) {
data.getOptions().setScoreboardStyle(SidebarOptionsItemState.OLD);
} else {
data.getOptions().setScoreboardStyle(SidebarOptionsItemState.MODERN);
}
})
);
buttonList.add(new ItemBuilder(Material.LEASH)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Duel Requests")
.addLore(
"",
CC.GRAY + "Você gostaria de receber",
CC.GRAY + "duelos?",
" ",
(data.getOptions().isDuelRequests() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isDuelRequests() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setDuelRequests(!data.getOptions().isDuelRequests()))
);
buttonList.add(new ItemBuilder(Material.LEASH)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Duel Requests")
.addLore(
"",
CC.GRAY + "Você gostaria de receber",
CC.GRAY + "duelos?",
" ",
(data.getOptions().isDuelRequests() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isDuelRequests() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setDuelRequests(!data.getOptions().isDuelRequests()))
);
buttonList.add(new ItemBuilder(Material.SLIME_BALL)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Party Invites")
.addLore(
"",
CC.GRAY + "Você gostaria de receber",
CC.GRAY + "convites pra Party?",
" ",
(data.getOptions().isPartyInvites() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isPartyInvites() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setPartyInvites(!data.getOptions().isPartyInvites()))
);
buttonList.add(new ItemBuilder(Material.SLIME_BALL)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Party Invites")
.addLore(
"",
CC.GRAY + "Você gostaria de receber",
CC.GRAY + "convites pra Party?",
" ",
(data.getOptions().isPartyInvites() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isPartyInvites() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setPartyInvites(!data.getOptions().isPartyInvites()))
);
buttonList.add(new ItemBuilder(Material.COMPASS)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Allow Spectators")
.addLore(
"",
CC.GRAY + "Você gostaria de deixar",
CC.GRAY + "espectadores na fight?",
" ",
(data.getOptions().isSpectators() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isSpectators() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setSpectators(!data.getOptions().isSpectators()))
);
buttonList.add(new ItemBuilder(Material.COMPASS)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Allow Spectators")
.addLore(
"",
CC.GRAY + "Você gostaria de deixar",
CC.GRAY + "espectadores na fight?",
" ",
(data.getOptions().isSpectators() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isSpectators() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setSpectators(!data.getOptions().isSpectators()))
);
buttonList.add(new ItemBuilder(Material.BLAZE_ROD)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Kill Effects")
.addLore(
CC.GRAY + "Clique para abrir as kill effects.",
" ",
CC.YELLOW + "[View all kill effects]"
buttonList.add(new ItemBuilder(Material.BLAZE_ROD)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Kill Effects")
.addLore(
CC.GRAY + "Clique para abrir as kill effects.",
" ",
CC.YELLOW + "[View all kill effects]"
)
.toButton((player1, clickType) -> {
new DeathEffectMenu().openMenu(player1);
})
);
)
.toButton((player1, clickType) -> {
new DeathEffectMenu().openMenu(player1);
})
);
buttonList.add(new ItemBuilder(Material.BOOK_AND_QUILL)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Kill Messages")
.addLore(
CC.GRAY + "Clique para ver as mensagens de kill.",
" ",
CC.YELLOW + "[View all kill messages]"
buttonList.add(new ItemBuilder(Material.BOOK_AND_QUILL)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Kill Messages")
.addLore(
CC.GRAY + "Clique para ver as mensagens de kill.",
" ",
CC.YELLOW + "[View all kill messages]"
)
.toButton((player1, clickType) -> {
new KillMessageMenu().openMenu(player1);
})
);
)
.toButton((player1, clickType) -> {
new KillMessageMenu().openMenu(player1);
})
);
buttonList.add(new ItemBuilder(Material.SKULL_ITEM)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Animações de corpo")
.addLore(
"",
CC.GRAY + "Qual tipo de animação de corpo",
CC.GRAY + "você quer na sua gameplay?",
" ",
(data.getOptions().getBodyAnimated() == BodyOptionsItemState.ANIMATED ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fAnimated",
(data.getOptions().getBodyAnimated() == BodyOptionsItemState.STATIC ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fStatic"
)
.toUpdatingButton((player1, clickType) -> {
if (data.getOptions().getBodyAnimated() == BodyOptionsItemState.ANIMATED) {
data.getOptions().setBodyAnimated(BodyOptionsItemState.STATIC);
} else {
data.getOptions().setBodyAnimated(BodyOptionsItemState.ANIMATED);
}
})
);
} else {
buttonList.add(new ItemBuilder(Material.SIGN)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Sidebar Mode")
.addLore(
"",
CC.GRAY + "Would you like to view",
CC.GRAY + "our sidebar at spawn or",
CC.GRAY + "in a match?",
" ",
(data.getOptions().isScoreboardEnabled() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isScoreboardEnabled() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setScoreboardEnabled(!data.getOptions().isScoreboardEnabled()))
);
buttonList.add(new ItemBuilder(Material.SKULL_ITEM)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Animações de corpo")
.addLore(
"",
CC.GRAY + "Qual tipo de animação de corpo",
CC.GRAY + "você quer na sua gameplay?",
" ",
(data.getOptions().getBodyAnimated() == BodyOptionsItemState.ANIMATED ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fAnimated",
(data.getOptions().getBodyAnimated() == BodyOptionsItemState.STATIC ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fStatic"
)
.toUpdatingButton((player1, clickType) -> {
if (data.getOptions().getBodyAnimated() == BodyOptionsItemState.ANIMATED) {
data.getOptions().setBodyAnimated(BodyOptionsItemState.STATIC);
} else {
data.getOptions().setBodyAnimated(BodyOptionsItemState.ANIMATED);
}
})
);
buttonList.add(new ItemBuilder(Material.ITEM_FRAME)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Sidebar Style")
.addLore(
"",
CC.GRAY + "Which style of our board",
CC.GRAY + "would you like to view",
CC.GRAY + "during a match?",
" ",
(data.getOptions().getScoreboardState().name().equals("PING") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fPing",
(data.getOptions().getScoreboardState().name().equals("ARENA") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fArena",
(data.getOptions().getScoreboardState().name().equals("LADDER") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fLadder",
(data.getOptions().getScoreboardState().name().equals("DURATION") ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDuration"
)
.toUpdatingButton((player1, clickType) -> {
switch (data.getOptions().getScoreboardState()) {
case PING:
data.getOptions().setScoreboardState(ProfileOptionsItemState.ARENA);
break;
case ARENA:
data.getOptions().setScoreboardState(ProfileOptionsItemState.LADDER);
break;
case LADDER:
data.getOptions().setScoreboardState(ProfileOptionsItemState.DURATION);
break;
default:
data.getOptions().setScoreboardState(ProfileOptionsItemState.PING);
break;
}
})
);
buttonList.add(new ItemBuilder(Material.PAINTING)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Sidebar Lines")
.addLore(
"",
CC.GRAY + "Would you like a different view",
CC.GRAY + "on your scoreboard?",
" ",
(data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.OLD ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fOld",
(data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.MODERN ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fModern"
)
.toUpdatingButton((player1, clickType) -> {
if (data.getOptions().getScoreboardStyle() == SidebarOptionsItemState.MODERN) {
data.getOptions().setScoreboardStyle(SidebarOptionsItemState.OLD);
} else {
data.getOptions().setScoreboardStyle(SidebarOptionsItemState.MODERN);
}
})
);
buttonList.add(new ItemBuilder(Material.LEASH)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Duel Requests")
.addLore(
"",
CC.GRAY + "Would you like to receive",
CC.GRAY + "duel requests?",
" ",
(data.getOptions().isDuelRequests() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isDuelRequests() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setDuelRequests(!data.getOptions().isDuelRequests()))
);
buttonList.add(new ItemBuilder(Material.SLIME_BALL)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Party Invites")
.addLore(
"",
CC.GRAY + "Would you like to receive",
CC.GRAY + "party invites?",
" ",
(data.getOptions().isPartyInvites() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isPartyInvites() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setPartyInvites(!data.getOptions().isPartyInvites()))
);
buttonList.add(new ItemBuilder(Material.COMPASS)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Allow Spectators")
.addLore(
"",
CC.GRAY + "Would you like to allow",
CC.GRAY + "spectators in matches?",
" ",
(data.getOptions().isSpectators() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fEnabled",
(!data.getOptions().isSpectators() ? CC.GREEN + CC.BOLD + "" : CC.DARK_GRAY + CC.BOLD + "") + "&fDisabled"
)
.toUpdatingButton((player1, clickType) -> data.getOptions().setSpectators(!data.getOptions().isSpectators()))
);
buttonList.add(new ItemBuilder(Material.BLAZE_ROD)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Kill Effects")
.addLore(
CC.GRAY + "Click to view kill effects.",
" ",
CC.YELLOW + "[View all kill effects]"
)
.toButton((player1, clickType) -> {
new DeathEffectMenu().openMenu(player1);
})
);
buttonList.add(new ItemBuilder(Material.BOOK_AND_QUILL)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Kill Messages")
.addLore(
CC.GRAY + "Click to view kill messages.",
" ",
CC.YELLOW + "[View all kill messages]"
)
.toButton((player1, clickType) -> {
new KillMessageMenu().openMenu(player1);
})
);
buttonList.add(new ItemBuilder(Material.ENCHANTED_BOOK)
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Matchmaking Settings")
.addLore(
CC.GRAY + "Configure matchmaking settings.",
" ",
CC.YELLOW + "[View matchmaking settings]"
)
.toButton((player1, clickType) -> {
if (!player1.hasPermission("practice.matchmaking.settings")) {
player1.sendMessage(CC.RED + "You don't have permission to open Matchmaking Settings! Get more information at our store: store.minion.lol.");
player1.closeInventory();
return;
}
new MatchmakingSettingsMenu().openMenu(player1);
})
);
}
return buttonList;
}