Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad6a09ba85 | ||
|
|
1791ec5e46 | ||
|
|
46457a9e61 | ||
|
|
38ab221fd8 | ||
|
|
fc2317655e | ||
|
|
fb183b9f1f | ||
|
|
64057723b6 | ||
|
|
703662c0c0 |
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.bencodez</groupId>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>6.0.2</version>
|
||||
<version>6.0.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>VotingPlugin</name>
|
||||
<properties>
|
||||
|
||||
@@ -47,9 +47,9 @@ public class BungeeHandler {
|
||||
plugin.getLogger().info("Using BungeeMethod: " + method.toString());
|
||||
|
||||
if (method.equals(BungeeMethod.MYSQL)) {
|
||||
plugin.registerBungeeChannels("VP:VP");
|
||||
plugin.registerBungeeChannels("vp:vp");
|
||||
} else if (method.equals(BungeeMethod.PLUGINMESSAGING)) {
|
||||
plugin.registerBungeeChannels("VP:VP");
|
||||
plugin.registerBungeeChannels("vp:vp");
|
||||
|
||||
plugin.getPluginMessaging().add(new PluginMessageHandler("Vote") {
|
||||
@Override
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -352,7 +352,7 @@ public class VotingPluginBungee extends Plugin implements net.md_5.bungee.api.pl
|
||||
|
||||
@EventHandler
|
||||
public void onPluginMessage(PluginMessageEvent ev) {
|
||||
if (!ev.getTag().equals("VP:VP".toLowerCase())) {
|
||||
if (!ev.getTag().equals("vp:vp".toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
ByteArrayInputStream instream = new ByteArrayInputStream(ev.getData());
|
||||
@@ -369,7 +369,7 @@ public class VotingPluginBungee extends Plugin implements net.md_5.bungee.api.pl
|
||||
}
|
||||
for (String send : getProxy().getServers().keySet()) {
|
||||
if (getProxy().getServers().get(send).getPlayers().size() > 0) {
|
||||
getProxy().getServers().get(send).sendData("VP:VP".toLowerCase(),
|
||||
getProxy().getServers().get(send).sendData("vp:vp".toLowerCase(),
|
||||
outstream.toByteArray());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user