Compare commits

...
6 Commits
Author SHA1 Message Date
BenCodez ad6a09ba85 Bug fix 2020-12-22 16:58:55 -05:00
BenCodez 1791ec5e46 Merge branch 'master' of https://github.com/BenCodez/VotingPlugin 2020-12-22 16:57:24 -05:00
BenCodez 46457a9e61 Update version number 2020-12-22 16:56:23 -05:00
Ben 38ab221fd8 Little bug fix 2020-12-22 05:39:59 -05:00
BenCodez fc2317655e Change default option 2020-12-21 20:12:52 -05:00
BenCodez fb183b9f1f Add option 2020-12-21 18:40:49 -05:00
8 changed files with 25 additions and 8 deletions

No files matched your search

@@ -28,6 +28,10 @@ BungeeDebug: false
# If false you need to enable
BungeeBroadcast: false
# If true & AllowUnJoined is false (Config.yml) it will remove any invalid players
# Not fully tested, could cause some trouble in some cases
RemoveInvalidUsers: false
# What server this is in bungee (must match)
# Also can be applied to rewards
Server: PleaseSet
+3 -3
View File
@@ -366,9 +366,9 @@ ClickSound:
# case sensitive
VotingBroadcastBlacklist: []
# Set to false to prevent javascript
# parsing on placeholderapi placeholders
UseJavascriptPlaceholders: true
# When enabled, javascript will be parsed on placeholders (from placeholderapi)
# allows more fancy placeholders with math for example
UseJavascriptPlaceholders: false
# Limit monthly votes to number of days of a month multipled by the number of sites
LimitMonthlyVotes: false
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bencodez</groupId>
<artifactId>VotingPlugin</artifactId>
<version>6.0.3</version>
<version>6.0.4</version>
<packaging>jar</packaging>
<name>VotingPlugin</name>
<properties>
@@ -240,7 +240,7 @@ public class VotingPluginBungee extends Plugin implements net.md_5.bungee.api.pl
method = BungeeMethod.getByName(config.getBungeeMethod());
if (method.equals(BungeeMethod.MYSQL)) {
this.getProxy().registerChannel("vp:vp".toLowerCase());
this.getProxy().registerChannel("vp:vp");
} else if (method.equals(BungeeMethod.PLUGINMESSAGING)) {
voteCacheFile = new VoteCache(this);
@@ -292,7 +292,7 @@ public class VotingPluginBungee extends Plugin implements net.md_5.bungee.api.pl
}
}, 15l, TimeUnit.SECONDS);
this.getProxy().registerChannel("VotingPlugin:VotingPlugin".toLowerCase());
this.getProxy().registerChannel("vp:vp");
} else if (method.equals(BungeeMethod.SOCKETS)) {
encryptionHandler = new EncryptionHandler(new File(getDataFolder(), "secretkey.key"));
@@ -434,7 +434,7 @@ public class VotingPluginBungee extends Plugin implements net.md_5.bungee.api.pl
out.writeUTF(message);
}
if (getProxy().getServers().get(server).getPlayers().size() > 0) {
getProxy().getServers().get(server).sendData("VotingPlugin:VotingPlugin".toLowerCase(),
getProxy().getServers().get(server).sendData("vp:vp".toLowerCase(),
byteOutStream.toByteArray(), false);
}
out.close();
@@ -1205,6 +1205,9 @@ public class CommandLoader {
plugin.getCommand("vote" + arg)
.setTabCompleter(new AliasesTabCompleter().setCMDHandle(cmdHandle, false));
if (plugin.getConfigFile().isDisableAdvancedTab()) {
plugin.getCommand("vote" + arg).setPermission(cmdHandle.getPerm().split("|")[0]);
}
for (String str : plugin.getCommand("vote" + arg).getAliases()) {
commands.put(str, cmdHandle);
}
@@ -1226,6 +1229,9 @@ public class CommandLoader {
plugin.getCommand("adminvote" + arg)
.setTabCompleter(new AliasesTabCompleter().setCMDHandle(cmdHandle, true));
if (plugin.getConfigFile().isDisableAdvancedTab()) {
plugin.getCommand("adminvote" + arg).setPermission(cmdHandle.getPerm().split("|")[0]);
}
for (String str : plugin.getCommand("adminvote" + arg).getAliases()) {
commands.put(str, cmdHandle);
}
@@ -37,6 +37,10 @@ public class BungeeSettings extends YMLFile {
@Getter
private int bungeeServerPort = 1297;
@ConfigDataBoolean(path = "RemoveInvalidUsers")
@Getter
private boolean removeInvalidUsers = false;
@ConfigDataString(path = "Server")
@Getter
private String server = "PleaseSet";
@@ -217,7 +217,7 @@ public class Config extends YMLFile {
@ConfigDataBoolean(path = "UseJavascriptPlaceholders")
@Getter
private boolean useJavascriptPlaceholders = true;
private boolean useJavascriptPlaceholders = false;
@ConfigDataBoolean(path = "UsePrimaryAccountForPlaceholders")
@Getter
@@ -49,6 +49,9 @@ public class PlayerVoteListener implements Listener {
if (!plugin.getConfigFile().isAllowUnjoined()) {
plugin.getLogger().warning("Player " + playerName
+ " has not joined before, disregarding vote, set AllowUnjoined to true to prevent this");
if (event.isBungee() && plugin.getBungeeSettings().isRemoveInvalidUsers()) {
UserManager.getInstance().getVotingPluginUser(playerName).remove();
}
return;
}
}