Skip to content

Commit

Permalink
Fix issue with new placeholder not always working
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Mar 1, 2024
1 parent e0d28be commit 040e467
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,18 @@ private ItemBuilder getItemAll() {

private ItemBuilder getItemVoteSite(VoteSite voteSite) {
ItemBuilder builder = new ItemBuilder(plugin.getGui().getChestVoteURLAlreadyVotedItemSection());
builder.addPlaceholder("SericeSite", voteSite.getServiceSite());

if (user.canVoteSite(voteSite)) {
builder = new ItemBuilder(plugin.getGui().getChestVoteURLCanVoteItemSection());
builder.addPlaceholder("SericeSite", voteSite.getServiceSite());
builder.setName(
plugin.getGui().getChestVoteURLGUISiteNameCanVote().replace("%Name%", voteSite.getDisplayName()));
} else {
builder.setName(plugin.getGui().getChestVoteURLGUISiteName().replace("%Name%", voteSite.getDisplayName()));
builder.addLoreLine(
plugin.getGui().getChestVoteURLNextVote().replace("%Info%", user.voteCommandNextInfo(voteSite)));
}
builder.addPlaceholder("SericeSite", voteSite.getServiceSite());

return builder;
}
Expand Down

0 comments on commit 040e467

Please sign in to comment.