Compare commits

...
11 Commits
Author SHA1 Message Date
BenCodez 64057723b6 Update version number 2020-12-19 17:51:20 -05:00
BenCodez 703662c0c0 Bug fix 2020-12-19 17:51:01 -05:00
BenCodez ac72b47362 Update version number 2020-12-19 16:57:43 -05:00
BenCodez 6ca0e26e9c Add per shop message for purchases 2020-12-19 16:45:59 -05:00
BenCodez 168f2fbce2 Improvements 2020-12-17 19:21:51 -05:00
BenCodez a45370011e Little change 2020-12-14 16:58:21 -05:00
BenCodez f85c97f50a Bug fix 2020-12-09 17:14:01 -05:00
BenCodez 1651f8b626 Add option 2020-12-08 21:27:31 -05:00
BenCodez ad08e4cfcf Little fix 2020-12-06 12:08:17 -05:00
BenCodez 91ec3456f5 Little change 2020-12-06 12:02:36 -05:00
BenCodez 4c4f0ef6ae Add per vote shop purchase confirmations 2020-11-30 19:04:51 -05:00
13 changed files with 39 additions and 18 deletions

No files matched your search

+5 -1
View File
@@ -288,7 +288,7 @@ Format:
Amount: 1
Name: '&aNext Page'
InvFull: '&cInventory full, dropping items on ground'
InvFull: '&cInventory full'
# Display text
# Used in /vote top (GUI)
@@ -351,6 +351,10 @@ PointsOnVote: 1
# Not really recommended
AddTotals: true
# If true, items given for rewards are dropped on the ground
# If false, items will be given when there is space
DropOnFullInv: true
# Click sound when using gui
# Set to none for no sound
ClickSound:
+4
View File
@@ -276,6 +276,10 @@ CHEST:
Permission: ''
# Whether or not to keep GUI open after purchase
CloseGUI: true
# Require confirmation on purchase, overrides global option above
RequireConfirmation: false
# Overrides other purchase message
#PurchaseMessage: 'Thanks for the purchase'
# Limit how many times you can buy this
#Limit: 3
# Reset limit daily/weekly/monthly
@@ -15,6 +15,9 @@ AllSites:
Messages:
Player: '&aYou voted on all sites in 1 day!'
# NOTE: This is not a 1 time reward, that's what milestones are for!
# If total votes (Can be changed) divided by cumulative amount
# and as no remainder (So divides perfectly)then a reward is given
Cumulative:
# Number of votes required
# Allows multiple cumulative rewards
@@ -42,6 +45,7 @@ VoteParty:
#IncreaseVotesRquired: 10
# If true, players who did not vote to reach the votes required will
# recieve the reward
# If false, only players who voted get rewards
GiveAllPlayers: false
# If true, the vote count will reset each day
ResetEachDay: false
@@ -62,6 +66,8 @@ VoteParty:
Commands: []
# Rewards to give per player
Rewards:
# Uncomment below for online player rewards only
#RewardType: ONLINE
Commands:
- say %player%
Items:
@@ -72,6 +78,7 @@ VoteParty:
# Reset milestones at end of the month
ResetMilestonesMonthly: false
# One time reward to be given (unless you reset it somehow)
MileStones:
# Number of votes required
# Allows multiple milestones
@@ -143,6 +150,8 @@ LoginRewards: []
# Will queue until player logs in unless forceoffline is enabled
LogoutRewards: []
EnableMonthlyAwards: true
# Rewards to give
MonthlyAwards:
# Position. 1 is first in top voter, 2 is second, etc...
-3
View File
@@ -141,9 +141,6 @@ commands:
adminvoteClearCache:
description: Command Alias
aliases: avClearCache
adminvoteConvertFrom:
description: Command Alias
aliases: avConvertFrom
adminvoteServiceSites:
description: Command Alias
aliases: avServiceSites
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bencodez</groupId>
<artifactId>VotingPlugin</artifactId>
<version>6.0.1</version>
<version>6.0.3</version>
<packaging>jar</packaging>
<name>VotingPlugin</name>
<properties>
@@ -24,7 +24,7 @@ public class User {
user.addPoints(points);
}
public void removePoints(int points) {
user.removePoints(points);
public boolean removePoints(int points) {
return user.removePoints(points);
}
}
@@ -47,9 +47,9 @@ public class BungeeHandler {
plugin.getLogger().info("Using BungeeMethod: " + method.toString());
if (method.equals(BungeeMethod.MYSQL)) {
plugin.registerBungeeChannels();
plugin.registerBungeeChannels("vp:vp");
} else if (method.equals(BungeeMethod.PLUGINMESSAGING)) {
plugin.registerBungeeChannels();
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("VotingPlugin:VotingPlugin".toLowerCase());
this.getProxy().registerChannel("vp:vp".toLowerCase());
} else if (method.equals(BungeeMethod.PLUGINMESSAGING)) {
voteCacheFile = new VoteCache(this);
@@ -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("VotingPlugin:VotingPlugin".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("VotingPlugin:VotingPlugin".toLowerCase(),
getProxy().getServers().get(send).sendData("vp:vp".toLowerCase(),
outstream.toByteArray());
}
}
@@ -106,7 +106,7 @@ public class VoteShop extends GUIHandler {
}
if (limitPass) {
if (!plugin.getGui().isChestVoteShopRequireConfirmation()) {
if (!plugin.getGui().isChestVoteShopRequireConfirmation(identifier)) {
HashMap<String, String> placeholders = new HashMap<String, String>();
placeholders.put("identifier",
plugin.getGui().getChestShopIdentifierIdentifierName(identifier));
@@ -119,7 +119,7 @@ public class VoteShop extends GUIHandler {
new RewardOptions().setPlaceholders(placeholders));
user.sendMessage(StringParser.getInstance().replacePlaceHolder(
plugin.getConfigFile().getFormatShopPurchaseMsg(), placeholders));
plugin.getGui().getCHESTVoteShopPurchase(identifier), placeholders));
if (limit > 0) {
user.setVoteShopIdentifierLimit(identifier,
user.getVoteShopIdentifierLimit(identifier) + 1);
@@ -66,7 +66,7 @@ public class VoteShopConfirm extends GUIHandler {
new RewardOptions().setPlaceholders(placeholders));
user.sendMessage(StringParser.getInstance()
.replacePlaceHolder(plugin.getConfigFile().getFormatShopPurchaseMsg(), placeholders));
.replacePlaceHolder(plugin.getGui().getCHESTVoteShopPurchase(identifier), placeholders));
if (limit > 0) {
user.setVoteShopIdentifierLimit(identifier, user.getVoteShopIdentifierLimit(identifier) + 1);
}
@@ -143,6 +143,10 @@ public class GUI extends YMLFile {
private boolean lastMonthGUI = false;
private VotingPluginMain plugin;
public String getCHESTVoteShopPurchase(String identifier) {
return getData().getString("CHEST.Shop." + identifier +".PurchaseMessage", plugin.getConfigFile().getFormatShopPurchaseMsg());
}
public GUI(VotingPluginMain plugin) {
super(plugin, new File(plugin.getDataFolder(), "GUI.yml"));
@@ -497,4 +501,9 @@ public class GUI extends YMLFile {
public void onFileCreation() {
plugin.saveResource("GUI.yml", true);
}
public boolean isChestVoteShopRequireConfirmation(String identifier) {
return getData().getBoolean("CHEST.Shop." + identifier + ".RequireConfirmation",
isChestVoteShopRequireConfirmation());
}
}
@@ -27,7 +27,7 @@ public class SpecialRewardsConfig extends YMLFile {
@ConfigDataBoolean(path = "EnableMonthlyAwards")
@Getter
private boolean enableMonthlyAwards = false;
private boolean enableMonthlyAwards = true;
@ConfigDataBoolean(path = "EnableWeeklyAwards")
@Getter
@@ -64,8 +64,6 @@ public class PlayerVoteListener implements Listener {
if (voteSite == null) {
if (!plugin.getConfigFile().isDisableNoServiceSiteMessage()) {
plugin.getLogger().warning("No voting site with the service site: '" + event.getServiceSite() + "'");
plugin.getLogger().warning(
"Please read here on how to fix it: https://github.com/Ben12345rocks/VotingPlugin/wiki/Common-Problems");
ArrayList<String> services = new ArrayList<String>();
for (VoteSite site : plugin.getVoteSites()) {