diff --git a/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java b/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java index ad76a46c4..6cbbfe56e 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java @@ -55,7 +55,7 @@ public ArrayList getChat(CommandSender sender) { return getChat(sender, false); } - public ArrayList getChat(CommandSender sender, boolean bypassPermissionCheck) { + public ArrayList getChat(CommandSender sender, boolean bypassCanVote) { ArrayList sites = new ArrayList(); List title = plugin.getConfigFile().getFormatCommandsVoteText(); @@ -66,10 +66,10 @@ public ArrayList 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(