Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2693874d99 | ||
|
|
f5b780453c | ||
|
|
7a7bb93091 | ||
|
|
8933dac0db | ||
|
|
822e0a5766 | ||
|
|
e1fdc5cd6b | ||
|
|
3b0451b348 | ||
|
|
4de380318f | ||
|
|
1c7afc8bb3 | ||
|
|
7b15289c43 |
No files matched your search
@@ -25,6 +25,7 @@ MySQL:
|
||||
MaxSize: -1
|
||||
# Table name prefix, for use with mutliple servers
|
||||
Prefix: ''
|
||||
#UseSSL: true
|
||||
|
||||
# Let players who never joined before vote
|
||||
# Recommend: False (Will prevent creating random user data files)
|
||||
@@ -823,3 +824,7 @@ PurgeOldData: false
|
||||
|
||||
# Minimum number of days offline in order to purge
|
||||
PurgeMin: 90
|
||||
|
||||
# Whether or not to disable checking names on mojang, disable if you hit the rate limit
|
||||
# Shouldn't make a noticeable impact if set to false
|
||||
CheckNameMojang: true
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.Ben12345rocks</groupId>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>5.12</version>
|
||||
<version>5.12.1</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>VotingPlugin</name>
|
||||
<properties>
|
||||
|
||||
@@ -720,7 +720,15 @@ public class CommandLoader {
|
||||
sender.sendMessage(StringUtils.getInstance()
|
||||
.colorize("&cServiceSite is invalid, votes may not work properly"));
|
||||
} else {
|
||||
sender.sendMessage(StringUtils.getInstance().colorize("&aServiceSite is properly setup"));
|
||||
String service = ConfigVoteSites.getInstance().getServiceSite(siteName);
|
||||
if (ServerData.getInstance().getServiceSites().contains(service)) {
|
||||
sender.sendMessage(StringUtils.getInstance().colorize("&aServiceSite is properly setup"));
|
||||
} else {
|
||||
sender.sendMessage(StringUtils.getInstance()
|
||||
.colorize("&cService may not be valid, haven't recieved a vote from " + service
|
||||
+ ", see /av servicesites"));
|
||||
}
|
||||
|
||||
}
|
||||
if (!ConfigVoteSites.getInstance().isVoteURLGood(siteName)) {
|
||||
sender.sendMessage(StringUtils.getInstance().colorize("&cVoteURL is invalid"));
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -377,6 +376,7 @@ public class PlayerGUIs {
|
||||
"topvoter", topVoter));
|
||||
int pos = 1;
|
||||
for (Entry<User, Integer> entry : users) {
|
||||
|
||||
inv.addButton(new BInventoryButton(
|
||||
new ItemBuilder(MiscUtils.getInstance().setSkullOwner(entry.getKey().getOfflinePlayer()))
|
||||
.setName(Config.getInstance().getGUIVoteTopItemName())
|
||||
@@ -387,13 +387,14 @@ public class PlayerGUIs {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent clickEvent) {
|
||||
ItemBuilder item = new ItemBuilder(clickEvent.getClickedItem());
|
||||
String name = ChatColor.stripColor(item.getName()).split(":")[1].trim();
|
||||
//ItemBuilder item = new ItemBuilder(clickEvent.getClickedItem());
|
||||
// String name = ChatColor.stripColor(item.getName()).split(":")[1].trim();
|
||||
String name = (String) clickEvent.getButton().getData("player");
|
||||
|
||||
User user = UserManager.getInstance().getVotingPluginUser(name);
|
||||
openVoteGUI(player, user);
|
||||
}
|
||||
});
|
||||
}.addData("player", entry.getKey().getPlayerName()));
|
||||
pos++;
|
||||
}
|
||||
final TopVoter cur = top;
|
||||
|
||||
@@ -838,7 +838,15 @@ public class Config extends YMLFile {
|
||||
}
|
||||
|
||||
public Set<String> getIdentifiers() {
|
||||
return getData().getConfigurationSection("Shop").getKeys(false);
|
||||
ConfigurationSection shop = getData().getConfigurationSection("Shop");
|
||||
if (shop != null) {
|
||||
return shop.getKeys(false);
|
||||
}
|
||||
return new HashSet<String>();
|
||||
}
|
||||
|
||||
public boolean getCheckNameMojang() {
|
||||
return getData().getBoolean("CheckNameMojang", true);
|
||||
}
|
||||
|
||||
public ConfigurationSection getIdentifierSection(String identifier) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ServerData {
|
||||
ServerData.plugin = plugin;
|
||||
}
|
||||
|
||||
public void addServiceSite(String site) {
|
||||
public synchronized void addServiceSite(String site) {
|
||||
ArrayList<String> l = getServiceSites();
|
||||
if (!getServiceSites().contains(site)) {
|
||||
l.add(site);
|
||||
|
||||
@@ -702,8 +702,13 @@ public class Main extends JavaPlugin {
|
||||
plugin.getLogger().info("Enabled VotingPlgin " + plugin.getDescription().getVersion());
|
||||
|
||||
for (VoteSite site : getVoteSites()) {
|
||||
if (!site.hasRewards() && !Config.getInstance().getDisableNoServiceSiteMessage()) {
|
||||
plugin.getLogger().warning("No rewards detected for the site: " + site.getKey());
|
||||
if (!site.hasRewards()) {
|
||||
plugin.getLogger().warning("No rewards detected for the site: " + site.getKey()
|
||||
+ ". See https://github.com/Ben12345rocks/AdvancedCore/wiki/Rewards on how to add rewards");
|
||||
}
|
||||
if (!ServerData.getInstance().getServiceSites().contains(site.getServiceSite())) {
|
||||
plugin.getLogger().warning("No vote has been recieved from " + site.getServiceSite()
|
||||
+ ", may be an invalid service site. Vote on the site and look in console for a service site, if you get nothing then there is an issue with votifier");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -892,8 +897,10 @@ public class Main extends JavaPlugin {
|
||||
ArrayList<String> uuids = UserManager.getInstance().getAllUUIDs();
|
||||
ArrayList<User> users = new ArrayList<User>();
|
||||
for (String uuid : uuids) {
|
||||
User user = UserManager.getInstance().getVotingPluginUser(new UUID(uuid));
|
||||
users.add(user);
|
||||
if (uuid != null && !uuid.isEmpty()) {
|
||||
User user = UserManager.getInstance().getVotingPluginUser(new UUID(uuid));
|
||||
users.add(user);
|
||||
}
|
||||
}
|
||||
update = false;
|
||||
long time1 = ((System.currentTimeMillis() - time) / 1000);
|
||||
@@ -944,6 +951,7 @@ public class Main extends JavaPlugin {
|
||||
|
||||
AdvancedCoreHook.getInstance().setPurgeOldData(Config.getInstance().getPurgeOldData());
|
||||
AdvancedCoreHook.getInstance().setPurgeMinimumDays(Config.getInstance().getPurgeMin());
|
||||
AdvancedCoreHook.getInstance().setCheckNameMojang(Config.getInstance().getCheckNameMojang());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user