Skip to content

Commit

Permalink
Changes to vote url GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Jun 17, 2024
1 parent e1c1d7b commit 5efd564
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public ArrayList<String> getChat(CommandSender sender) {
return getChat(sender, false);
}

public ArrayList<String> getChat(CommandSender sender, boolean bypassPermissionCheck) {
public ArrayList<String> getChat(CommandSender sender, boolean bypassCanVote) {
ArrayList<String> sites = new ArrayList<String>();

List<String> title = plugin.getConfigFile().getFormatCommandsVoteText();
Expand All @@ -66,10 +66,10 @@ public ArrayList<String> getChat(CommandSender sender, boolean bypassPermissionC
int counter = 0;
for (VoteSite voteSite : plugin.getVoteSitesEnabled()) {
if (!voteSite.isHidden()) {
if (voteSite.getPermissionToView().isEmpty() || bypassPermissionCheck
if (voteSite.getPermissionToView().isEmpty()
|| sender.hasPermission(voteSite.getPermissionToView())) {
if (!plugin.getConfigFile().isFormatCommandsVoteOnlyShowSitesToVote()
|| user.canVoteSite(voteSite)) {
|| user.canVoteSite(voteSite) || bypassCanVote) {
counter++;
String voteURL = voteSite.getVoteURL(json);
MessageBuilder message = new MessageBuilder(
Expand Down

0 comments on commit 5efd564

Please sign in to comment.