Compare commits

...
3 Commits
Author SHA1 Message Date
BenCodez e408c07f85 Update version number 2021-04-07 17:01:28 -04:00
Ben 4700684f03 Fix yml error 2021-04-07 04:48:56 -04:00
BenCodez 8ef7631eed Add option to ignore can vote per votesite 2021-04-04 16:13:59 -04:00
5 changed files with 18 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -247,7 +247,7 @@ Format:
Today:
Title:
- '&cToday's Votes %page%/%maxpage%'
- "&cToday's Votes %page%/%maxpage%"
- '&cPlayerName : VoteSite : Time'
Line: '&6%player% : %VoteSite% : %Time%'
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bencodez</groupId>
<artifactId>VotingPlugin</artifactId>
<version>6.2</version>
<version>6.2.1</version>
<packaging>jar</packaging>
<name>VotingPlugin</name>
<properties>
@@ -148,6 +148,10 @@ public class ConfigVoteSites extends YMLFile {
public boolean getVoteSiteHidden(String siteName) {
return getData(siteName).getBoolean("Hidden");
}
public boolean getVoteSiteIgnoreCanVote(String siteName) {
return getData(siteName).getBoolean("IgnoreCanVote");
}
/**
* Gets the vote site file.
@@ -83,6 +83,10 @@ public class VoteSite {
@Getter
@Setter
private boolean waitUntilVoteDelay;
@Getter
@Setter
private boolean ignoreCanVote;
public VoteSite(VotingPluginMain plugin, String siteName) {
this.plugin = plugin;
@@ -228,6 +232,7 @@ public class VoteSite {
waitUntilVoteDelay = plugin.getConfigVoteSites().getWaitUntilVoteDelay(key);
timeOffSet = plugin.getConfigVoteSites().getTimeOffSet(key);
hidden = plugin.getConfigVoteSites().getVoteSiteHidden(key);
ignoreCanVote = plugin.getConfigVoteSites().getVoteSiteIgnoreCanVote(key);
}
public boolean isVaidServiceSite() {
@@ -193,7 +193,8 @@ public class VotingPluginUser extends com.bencodez.advancedcore.api.user.Advance
}
}
public void bungeeVotePluginMessaging(String service, long time, BungeeMessageData text, boolean setTotals, boolean wasOnline) {
public void bungeeVotePluginMessaging(String service, long time, BungeeMessageData text, boolean setTotals,
boolean wasOnline) {
if (plugin.getBungeeSettings().isUseBungeecoord()) {
VotingPluginMain.plugin.debug("Pluginmessaging vote for " + getPlayerName() + " on " + service);
@@ -233,9 +234,11 @@ public class VotingPluginUser extends com.bencodez.advancedcore.api.user.Advance
public boolean canVoteAny() {
for (VoteSite voteSite : plugin.getVoteSites()) {
boolean canVote = canVoteSite(voteSite);
if (canVote) {
return true;
if (!voteSite.isIgnoreCanVote()) {
boolean canVote = canVoteSite(voteSite);
if (canVote) {
return true;
}
}
}
return false;