Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e9916fcbd | ||
|
|
e81c3e27bc | ||
|
|
f4613cdce4 | ||
|
|
799340ce06 | ||
|
|
ea1a033f2e | ||
|
|
dabdd8ae8f | ||
|
|
3e2b7eede9 | ||
|
|
f941deed79 | ||
|
|
f601b4a134 | ||
|
|
26630725bd | ||
|
|
7faa90ce43 | ||
|
|
4c99b6b06e | ||
|
|
2f2d8278a4 | ||
|
|
e8be2974f9 | ||
|
|
4930feff94 |
No files matched your search
@@ -42,12 +42,12 @@ AllowUnjoined: false
|
||||
VoteReminding:
|
||||
# Enable vote reminding
|
||||
# This will remind player when he can vote on all sites
|
||||
# Requires VoteDelay's to be setup properly
|
||||
# Requires VoteDelays to be setup properly
|
||||
# Use /vote next to see when you can be reminded
|
||||
# Players require the perm "VotingPlugin.Login.RemindVotes" or "VotingPlugin.Player"
|
||||
Enabled: true
|
||||
|
||||
# Wether or t to remind only once when the player can vote
|
||||
# Whether or not to remind only once when the player can vote
|
||||
# Does not apply to login reminds.
|
||||
RemindOnlyOnce: true
|
||||
|
||||
@@ -91,7 +91,7 @@ VoteReminding:
|
||||
# Set Message to '' (2 ') to disable message
|
||||
|
||||
Commands:
|
||||
# Wether or not the following commands will open GUIs rather than display text
|
||||
# Whether or not the following commands will open GUIs rather than display text
|
||||
UseGUI:
|
||||
Today: true
|
||||
TopVoter: true
|
||||
@@ -224,6 +224,9 @@ Format:
|
||||
- '&3Highest Week Streak: &3&l%BestWeeklyStreak%'
|
||||
- '&3Highest Month Streak: &3&l%BestMonthlyStreak%'
|
||||
|
||||
Today:
|
||||
Line: '&6%player% : %VoteSite% : %Time%'
|
||||
|
||||
# PlaceHolders:
|
||||
# %VotesRequired% = VotesRequired
|
||||
# %NeededVotes% = Number of votes needed to reach VotesRequired
|
||||
@@ -282,9 +285,16 @@ Format:
|
||||
# User not exist message, from commands such as /vote next (player)
|
||||
UserNotExist: '&cUser does not exist: %player%'
|
||||
|
||||
# Text for page buttons in inventories
|
||||
PrevPage: '&aPrevious Page'
|
||||
NextPage: '&aNext Page'
|
||||
# Prev/Next page tems in GUIs
|
||||
PrevItem:
|
||||
Material: 'BLACK_STAINED_GLASS_PANE'
|
||||
Amount: 1
|
||||
Name: '&aPrevious Page'
|
||||
|
||||
NextItem:
|
||||
Material: 'BLACK_STAINED_GLASS_PANE'
|
||||
Amount: 1
|
||||
Name: '&aNext Page'
|
||||
|
||||
InvFull: '&cInventory full, dropping items on ground'
|
||||
|
||||
@@ -831,7 +841,7 @@ RequestAPI:
|
||||
DefaultMethod: 'Anvil'
|
||||
DisabledMethods: []
|
||||
|
||||
# Wether or not to log every vote to a file
|
||||
# Whether or not to log every vote to a file
|
||||
# Use this if you wanna track player votes
|
||||
# Not recommended though
|
||||
LogVotesToFile: false
|
||||
@@ -905,6 +915,10 @@ LoadCommandAliases: true
|
||||
# Requires AuthMe
|
||||
WaitUntilLoggedIn: true
|
||||
|
||||
# Preload skulls to improve performance
|
||||
# If false, skulls will be cached as they are used
|
||||
PreloadSkulls: true
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Mysql cache options
|
||||
# Clearing cache forces the plugin to pull from database
|
||||
@@ -938,4 +952,4 @@ ClearCacheOnVote: false
|
||||
|
||||
# Disable checking on world change
|
||||
# May improve performance
|
||||
#DisableCheckOnWorldChange: false
|
||||
#DisableCheckOnWorldChange: false
|
||||
@@ -4,6 +4,7 @@ main: com.Ben12345rocks.VotingPlugin.Main
|
||||
description: Highly Customizable Voting Listener!
|
||||
website: https://www.spigotmc.org/resources/votingplugin.15358/
|
||||
author: Ben12345rocks
|
||||
softdepend: [MVdWPlaceholders]
|
||||
api-version: 1.13
|
||||
commands:
|
||||
vote:
|
||||
@@ -63,6 +64,9 @@ commands:
|
||||
votechoices:
|
||||
description: A command
|
||||
alaises: vchoices
|
||||
votegivepoints:
|
||||
description: A command
|
||||
alaises: vgivepoints
|
||||
adminvotehelp:
|
||||
description: Open adminvote help
|
||||
aliases: avhelp
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.Ben12345rocks</groupId>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>5.18</version>
|
||||
<version>5.18.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>VotingPlugin</name>
|
||||
<properties>
|
||||
|
||||
@@ -1982,31 +1982,28 @@ public class CommandLoader {
|
||||
});
|
||||
|
||||
if (Config.getInstance().isAllowVotePointTransfers()) {
|
||||
plugin.getVoteCommand()
|
||||
.add(new CommandHandler(new String[] { "GivePoints", "(player)", "(number)" },
|
||||
"VotingPlugin.Commands.Vote.GivePoints|" + playerPerm,
|
||||
"Give someone points from your points", false) {
|
||||
plugin.getVoteCommand().add(new CommandHandler(new String[] { "GivePoints", "(player)", "(number)" },
|
||||
"VotingPlugin.Commands.Vote.GivePoints", "Give someone points from your points", false) {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if (Config.getInstance().isAllowVotePointTransfers()) {
|
||||
User cPlayer = UserManager.getInstance().getVotingPluginUser((Player) sender);
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if (Config.getInstance().isAllowVotePointTransfers()) {
|
||||
User cPlayer = UserManager.getInstance().getVotingPluginUser((Player) sender);
|
||||
|
||||
User user = UserManager.getInstance().getVotingPluginUser(args[1]);
|
||||
int pointsToGive = Integer.parseInt(args[2]);
|
||||
if (cPlayer.getPoints() >= pointsToGive) {
|
||||
user.addPoints(pointsToGive);
|
||||
cPlayer.removePoints(pointsToGive);
|
||||
sendMessage(sender,
|
||||
"&c" + pointsToGive + " points given to " + user.getPlayerName());
|
||||
user.sendMessage("&cYou received " + pointsToGive + " points from "
|
||||
+ cPlayer.getPlayerName());
|
||||
} else {
|
||||
sendMessage(sender, "&cNot enough points");
|
||||
}
|
||||
}
|
||||
User user = UserManager.getInstance().getVotingPluginUser(args[1]);
|
||||
int pointsToGive = Integer.parseInt(args[2]);
|
||||
if (cPlayer.getPoints() >= pointsToGive) {
|
||||
user.addPoints(pointsToGive);
|
||||
cPlayer.removePoints(pointsToGive);
|
||||
sendMessage(sender, "&c" + pointsToGive + " points given to " + user.getPlayerName());
|
||||
user.sendMessage(
|
||||
"&cYou received " + pointsToGive + " points from " + cPlayer.getPlayerName());
|
||||
} else {
|
||||
sendMessage(sender, "&cNot enough points");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
plugin.getVoteCommand().add(
|
||||
|
||||
@@ -888,7 +888,13 @@ public class Commands {
|
||||
for (VoteSite voteSite : plugin.getVoteToday().get(user).keySet()) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Config.getInstance().getFormatTimeFormat());
|
||||
String timeString = plugin.getVoteToday().get(user).get(voteSite).format(formatter);
|
||||
msg.add("&6" + user.getPlayerName() + " : " + voteSite.getKey() + " : " + timeString);
|
||||
HashMap<String, String> placeholders = new HashMap<String, String>();
|
||||
placeholders.put("player", user.getPlayerName());
|
||||
placeholders.put("votesite", voteSite.getKey());
|
||||
placeholders.put("time", timeString);
|
||||
msg.add(StringUtils.getInstance()
|
||||
.replacePlaceHolder(Config.getInstance().getFormatCommandsVoteTodayLine(), placeholders));
|
||||
// msg.add("&6" + user.getPlayerName() + " : " + voteSite.getKey() + " : " + timeString);
|
||||
}
|
||||
}
|
||||
msg = ArrayUtils.getInstance().colorize(msg);
|
||||
|
||||
@@ -267,6 +267,10 @@ public class Config extends YMLFile {
|
||||
@Getter
|
||||
private int formatPageSize = 10;
|
||||
|
||||
@ConfigDataString(path = "Format.Commands.Vote.Today.Line")
|
||||
@Getter
|
||||
private String formatCommandsVoteTodayLine = "&6%player% : %VoteSite% : %Time%";
|
||||
|
||||
/**
|
||||
* Instantiates a new config.
|
||||
*/
|
||||
|
||||
@@ -705,6 +705,14 @@ public class Main extends JavaPlugin {
|
||||
public void onEnable() {
|
||||
plugin = this;
|
||||
|
||||
// disable plugin for older versions below 1.12
|
||||
if (NMSManager.getInstance().isVersion("1.7", "1.8", "1.9", "1.10", "1.11", "1.12")) {
|
||||
plugin.getLogger().severe("Detected running " + NMSManager.getInstance().getVersion()
|
||||
+ ", this version is not supported on this build. Disabling");
|
||||
Bukkit.getPluginManager().disablePlugin(plugin);
|
||||
return;
|
||||
}
|
||||
|
||||
setupFiles();
|
||||
loadVoteSites();
|
||||
AdvancedCoreHook.getInstance().setJenkinsSite("ben12345rocks.com");
|
||||
@@ -841,11 +849,6 @@ public class Main extends JavaPlugin {
|
||||
}
|
||||
}, 30l);
|
||||
}
|
||||
|
||||
if (NMSManager.getInstance().isVersion("1.7", "1.8", "1.9", "1.10", "1.11", "1.12")) {
|
||||
plugin.getLogger().severe("Detected running " + NMSManager.getInstance().getVersion()
|
||||
+ ", this version is not supported on this build. Support is limited");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -126,6 +126,8 @@ public class VoteSite {
|
||||
}
|
||||
|
||||
MiscUtils.getInstance().broadcast(bc, players);
|
||||
} else {
|
||||
plugin.debug(user.getPlayerName() + " is vanished, not broadcasting");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user