board stuff
This commit is contained in:
parent
9773f3e68e
commit
5e638672d9
@ -36,7 +36,7 @@ public class BoardAdapter implements AssembleAdapter {
|
|||||||
case OLD:
|
case OLD:
|
||||||
return CC.GOLD + CC.BOLD + (!Practice.getInstance().isHolanda() ? "Battle " + CC.GRAY + "⏐" + CC.WHITE + " Practice" : "Practice");
|
return CC.GOLD + CC.BOLD + (!Practice.getInstance().isHolanda() ? "Battle " + CC.GRAY + "⏐" + CC.WHITE + " Practice" : "Practice");
|
||||||
case MODERN:
|
case MODERN:
|
||||||
return CC.GOLD + CC.BOLD + " Practice";
|
return CC.GOLD + CC.BOLD + "Practice";
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -87,11 +87,11 @@ public class BoardAdapter implements AssembleAdapter {
|
|||||||
switch (playerData.getOptions().getScoreboardStyle()) {
|
switch (playerData.getOptions().getScoreboardStyle()) {
|
||||||
case MODERN:
|
case MODERN:
|
||||||
lines.add("");
|
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;
|
break;
|
||||||
case OLD:
|
case OLD:
|
||||||
lines.add("");
|
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);
|
lines.add(CC.SB_LINE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class PracticeSettingsImpl implements ISettings {
|
|||||||
public List<Button> getButtons(Player player) {
|
public List<Button> getButtons(Player player) {
|
||||||
final List<Button> buttonList = new ArrayList<>();
|
final List<Button> buttonList = new ArrayList<>();
|
||||||
final PlayerData data = Practice.getInstance().getPlayerManager().getPlayerData(player.getUniqueId());
|
final PlayerData data = Practice.getInstance().getPlayerManager().getPlayerData(player.getUniqueId());
|
||||||
|
if (!Practice.getInstance().isHolanda()) {
|
||||||
buttonList.add(new ItemBuilder(Material.SIGN)
|
buttonList.add(new ItemBuilder(Material.SIGN)
|
||||||
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Score")
|
.setDisplayName(Color.MAIN_COLOR + CC.BOLD + "Score")
|
||||||
.addLore(
|
.addLore(
|
||||||
@ -182,6 +182,157 @@ public class PracticeSettingsImpl implements ISettings {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
} 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.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;
|
return buttonList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user