Compare commits

...
20 Commits
Author SHA1 Message Date
BenCodez 3f54c05f86 Update version number to 6.9.4 2022-08-27 19:30:43 -04:00
BenCodez dd1cf02c49 Fix voteparty setextrarequired command 2022-08-22 15:43:35 -04:00
BenCodez b462373dfc Run bstats metrics async 2022-08-20 07:54:20 -04:00
BenCodez c6e5d008d2 Update to 1.19.2 2022-08-07 14:07:31 -04:00
BenCodez 9a91561304 Improve addpoints command 2022-08-04 15:36:19 -04:00
BenCodez 1c6981e538 Change name of plugin in softdepend 2022-07-28 15:48:15 -04:00
BenCodez b6e366ff9d Update to 1.19.1 2022-07-27 18:59:58 -04:00
BenCodez ca0fbe7e3b Update version number to 6.9.3 2022-07-23 16:21:02 -04:00
BenCodez 27d8b3e718 Change gottenmilestones column to be bigger 2022-07-22 20:11:38 -04:00
BenCodez 8430609d0f Fix error on velocity if mysql is not set 2022-07-16 17:16:55 -04:00
BenCodez 8fe5e87999 Improve config comments 2022-07-10 15:06:43 -04:00
BenCodez 6b985e19c2 Add new experimental support for redis, new fully tested 2022-07-03 21:22:17 -04:00
BenCodez 4636cc78b2 Fix an error on velocity 2022-07-03 12:01:12 -04:00
BenCodez 8c66b50749 Fix spelling 2022-06-30 07:57:10 -04:00
BenCodez 7f6e95d47e Clicking icons in /votelast can now open links (if enabled) 2022-06-27 08:11:54 -04:00
BenCodez cd60ade45f Add additional debug for loading votesites 2022-06-26 12:39:24 -04:00
BenCodez f82945b97b Fix typo 2022-06-21 19:37:51 -04:00
BenCodez a3e9651378 Add config option to always process placeholders 2022-06-21 19:14:23 -04:00
BenCodez a764ca0ed7 Undo change 2022-06-21 19:03:51 -04:00
BenCodez d21464560a Minor change in placeholder handling 2022-06-21 19:01:31 -04:00
21 changed files with 256 additions and 112 deletions

No files matched your search

+34 -26
View File
@@ -441,32 +441,6 @@ PreventRepeatMilestones: false
# This is to prevent any possible exploits
CloseInventoryOnVote: true
# When enabled the command /vote setprimaryaccount (playername)
# will be shown (after restart)
# Primary account will be used instead of the players account to get
# placeholder and other data such as vote reminding
# Mainly to be used for alts and such
UsePrimaryAccountForPlaceholders: false
# Always force placeholders to return value if the value isn't cached
# This should prevent server from crashing when pulling placeholders on main thread
# Only affects placeholderapi placeholders
AlwaysWaitForCachePlaceholders: false
# Enable auto caching placeholders
# Generally this works well, but if you need to cache placeholders manually set them below
AutoCachePlaceholders: false
# Set which placeholders to cache at all times
# Use for placeholders to are pulled constantly or on the main thread
# Mainly aimed for scoreboards
# Placeholders may auto cache in certain conditions
# Will use additional memory, but not a lot
# Still in early stages, please report bugs
# Please remove VotingPlugin_ from the placeholder listed here
CachedPlaceholders: []
#- Total_AllTime
# If true, permissions will be handled differently
MultiplePermissionsCheck: false
@@ -488,6 +462,40 @@ CustomCommands:
# Forces player to run this command
Commands:
- tokencommand
# ---------------------------------------
# Placeholderapi placeholders settings
# ---------------------------------------
# When enabled the command /vote setprimaryaccount (playername)
# will be shown (after restart)
# Primary account will be used instead of the players account to get
# placeholder and other data such as vote reminding
# Mainly to be used for alts and such
UsePrimaryAccountForPlaceholders: false
# Always force placeholders to return value if the value isn't cached
# This should prevent server from crashing when pulling placeholders on main thread
# Only affects placeholderapi placeholders
AlwaysWaitForCachePlaceholders: false
# Always force placeholders to be processed and return a proper value
# This has small chance of crashing the server (mainly with mysql and using placeholders on main thread)
AlwaysProcessPlaceholders: false
# Enable auto caching placeholders
# Generally this works well, but if you need to cache placeholders manually set them below
AutoCachePlaceholders: false
# Set which placeholders to cache at all times
# Use for placeholders to are pulled constantly or on the main thread
# Mainly aimed for scoreboards
# Placeholders may auto cache in certain conditions
# Will use additional memory, but not a lot
# Still in early stages, please report bugs
# Please remove VotingPlugin_ from the placeholder listed here
CachedPlaceholders: []
#- Total_AllTime
######################
# Debug
+1
View File
@@ -138,6 +138,7 @@ CHEST:
# %time% = time, using timeformat below
# %timesince% = time since vote
Line: '&6%timeSince%'
ClickableLinks: true
VoteNext:
Name: 'VoteNext: %player%'
BackButton: true
+26 -5
View File
@@ -51,10 +51,6 @@ PointsOnVote: 1
# Recommened to leave true, setting to false setups are currently unsupported
BungeeManageTotals: true
# Support for redis
# experimental
RedisSupport: false
# Tell servers to broadcast
# Set DisableBroadcast to true on spigot servers (BungeeSettings.yml) as well
Broadcast: true
@@ -91,4 +87,29 @@ WaitForUserOnline: false
# ONLY for SOCKET method
# ----------------------------
# Options available here:
# https://github.com/BenCodez/VotingPlugin/wiki/Bungee-Setup-SOCKETS
# https://github.com/BenCodez/VotingPlugin/wiki/Bungee-Setup-SOCKETS
# ----------------------------
# Redis setup
# Experimental
# Primary server for redis needs votifier
# Set socket host on each proxy and redissockets on primary redis only
# All servers on pluginmessaging
# ----------------------------
# Support for redis
# experimental
RedisSupport: false
# Enable on primary server with votifier
PrimaryServer: false
RedisSocketHost:
Host: 0.0.0.0
Port: 1234
RedisServers:
secondproxy:
Host: 0.0.0.0
Port: 1235
+1 -1
View File
@@ -16,7 +16,7 @@ softdepend:
- MVdWPlaceholderAPI
- AuthMe
- SuperVanish
- PremiumVanishs
- PremiumVanish
- DiscordSRV
loadbefore:
- MCPerks
+2 -2
View File
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bencodez</groupId>
<artifactId>votingplugin</artifactId>
<version>6.9.2</version>
<version>6.9.4</version>
<packaging>jar</packaging>
<name>VotingPlugin</name>
<properties>
@@ -226,7 +226,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -1019,7 +1019,13 @@ public class VotingPluginMain extends AdvancedCorePlugin {
topVoterHandler.register();
metrics();
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
@Override
public void run() {
metrics();
}
});
// javascript api
getJavascriptEngineRequests().add(new JavascriptPlaceholderRequest("User") {
@@ -53,6 +53,14 @@ public class Config {
return getData().getInt("BungeeServer.Port", 1297);
}
public int getRedisSocketHostPort() {
return getData().getInt("RedisSocketHost.Port", 1297);
}
public String getRedisSocketHostHost() {
return getData().getString("RedisSocketHost.Host", "");
}
public boolean getDebug() {
return getData().getBoolean("Debug", false);
}
@@ -73,6 +81,14 @@ public class Config {
return getData().getSection("SpigotServers." + s);
}
public Configuration getRedisServersConfiguration(String s) {
return getData().getSection("RedisServers." + s);
}
public Collection<String> getRedisServers() {
return getData().getSection("RedisServers").getKeys();
}
public Collection<String> getSpigotServers() {
return getData().getSection("SpigotServers").getKeys();
}
@@ -81,6 +97,10 @@ public class Config {
return getData().getBoolean("WaitForUserOnline", false);
}
public boolean getPrimaryServer() {
return getData().getBoolean("PrimaryServer", false);
}
public boolean getVotePartyEnabled() {
return getData().getBoolean("VoteParty.Enabled", false);
}
@@ -9,6 +9,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
@Deprecated
public class RedisBungee implements Listener {
@Getter
private boolean enabled;
@@ -26,7 +26,7 @@ public class VoteEventBungee implements net.md_5.bungee.api.plugin.Listener {
serviceSite = "Empty";
}
plugin.vote(vote.getUsername(), serviceSite, true);
plugin.vote(vote.getUsername(), serviceSite, true, null, null);
}
});
@@ -63,6 +63,8 @@ public class VotingPluginBungee extends Plugin implements Listener {
private HashMap<String, ClientHandler> clientHandles;
private HashMap<String, ClientHandler> redisClientHandles;
@Getter
private Config config;
@@ -78,13 +80,12 @@ public class VotingPluginBungee extends Plugin implements Listener {
private SocketHandler socketHandler;
private SocketHandler redisSocketHandler;
private VoteCache voteCacheFile;
private boolean votifierEnabled = true;
@Getter
private RedisBungee redis;
@Getter
private TimeHandle timeHandle;
@@ -338,9 +339,6 @@ public class VotingPluginBungee extends Plugin implements Listener {
if (mysql != null) {
mysql.shutdown();
}
if (redis != null) {
redis.destroy();
}
getLogger().info("VotingPlugin disabled");
}
@@ -363,12 +361,6 @@ public class VotingPluginBungee extends Plugin implements Listener {
config = new Config(this);
config.load();
try {
redis = new RedisBungee(this);
} catch (Exception e) {
e.printStackTrace();
}
getProxy().getPluginManager().registerCommand(this, new VotingPluginBungeeCommand(this));
boolean mysqlLoaded = true;
@@ -525,6 +517,42 @@ public class VotingPluginBungee extends Plugin implements Listener {
votePartyVotes = voteCacheFile.getVotePartyCurrentVotes();
}
if (getConfig().getRedisSupport()) {
redisSocketHandler = new SocketHandler(getDescription().getVersion(), config.getRedisSocketHostHost(),
config.getRedisSocketHostPort(), encryptionHandler, config.getDebug()) {
@Override
public void log(String str) {
getLogger().info(str);
}
};
redisSocketHandler.add(new SocketReceiver() {
@Override
public void onReceive(String[] data) {
if (data.length > 8) {
if (data[0].equalsIgnoreCase("Vote")) {
// todo
// sendRedisServerMessage("Vote", uuid, player, service, "" + votePartyVotes,""
// + currentVotePartyVotesRequired, "" + time, "" + realVote, text.toString());
vote(data[2], data[3], Boolean.valueOf(data[7]), new BungeeMessageData(data[8]), data[1]);
}
}
}
});
clientHandles = new HashMap<String, ClientHandler>();
for (
String s : config.getRedisServers()) {
Configuration d = config.getRedisServersConfiguration(s);
redisClientHandles.put(s, new ClientHandler(d.getString("Host", ""), d.getInt("Port", 1234),
encryptionHandler, config.getDebug()));
}
}
BStatsMetricsBungee metrics = new BStatsMetricsBungee(this, 9453);
metrics.addCustomChart(
@@ -574,11 +602,7 @@ public class VotingPluginBungee extends Plugin implements Listener {
public boolean isOnline(ProxiedPlayer p) {
if (p != null) {
if (redis != null && redis.isEnabled()) {
return redis.isOnline(p);
} else {
return p.isConnected();
}
return p.isConnected();
}
return false;
@@ -723,6 +747,12 @@ public class VotingPluginBungee extends Plugin implements Listener {
}
}
public void sendRedisServerMessage(String... messageData) {
for (ClientHandler h : redisClientHandles.values()) {
h.sendMessage(messageData);
}
}
public void sendServerMessageServer(String server, String... messageData) {
if (clientHandles.containsKey(server)) {
clientHandles.get(server).sendMessage(messageData);
@@ -783,14 +813,17 @@ public class VotingPluginBungee extends Plugin implements Listener {
}
}
public synchronized void vote(String player, String service, boolean realVote) {
public synchronized void vote(String player, String service, boolean realVote, BungeeMessageData text,
String uuid) {
try {
if (player == null || player.isEmpty()) {
getLogger().info("No name from vote on " + service);
return;
}
String uuid = getUUID(player);
if (uuid == null) {
uuid = getUUID(player);
}
if (uuid.isEmpty()) {
if (config.getAllowUnJoined()) {
debug("Fetching UUID online, since allowunjoined is enabled");
@@ -815,43 +848,42 @@ public class VotingPluginBungee extends Plugin implements Listener {
player = getProperName(uuid, player);
BungeeMessageData text = null;
if (!getConfig().getPrimaryServer()) {
addVoteParty();
if (getConfig().getBungeeManageTotals()) {
addVoteParty();
if (mysql == null) {
getLogger().severe("Mysql is not loaded correctly, stopping vote processing");
return;
}
if (getConfig().getBungeeManageTotals()) {
// one time query to insert player
if (!mysql.getUuids().contains(uuid)) {
mysql.update(uuid, "PlayerName", new DataValueString(player));
}
if (mysql == null) {
getLogger().severe("Mysql is not loaded correctly, stopping vote processing");
return;
ArrayList<Column> data = mysql.getExactQuery(new Column("uuid", new DataValueString(uuid)));
int allTimeTotal = getValue(data, "AllTimeTotal", 1);
int monthTotal = getValue(data, "MonthTotal", 1);
int weeklyTotal = getValue(data, "WeeklyTotal", 1);
int dailyTotal = getValue(data, "DailyTotal", 1);
int points = getValue(data, "Points", getConfig().getPointsOnVote());
int milestoneCount = getValue(data, "MilestoneCount", 1);
text = new BungeeMessageData(allTimeTotal, monthTotal, weeklyTotal, dailyTotal, points,
milestoneCount, votePartyVotes, currentVotePartyVotesRequired);
ArrayList<Column> update = new ArrayList<Column>();
update.add(new Column("AllTimeTotal", new DataValueInt(allTimeTotal)));
update.add(new Column("MonthTotal", new DataValueInt(monthTotal)));
update.add(new Column("WeeklyTotal", new DataValueInt(weeklyTotal)));
update.add(new Column("DailyTotal", new DataValueInt(dailyTotal)));
update.add(new Column("Points", new DataValueInt(points)));
update.add(new Column("MilestoneCount", new DataValueInt(milestoneCount)));
debug("Setting totals " + text.toString());
mysql.update(uuid, update);
} else {
text = new BungeeMessageData(0, 0, 0, 0, 0, 0, votePartyVotes, currentVotePartyVotesRequired);
}
// one time query to insert player
if (!mysql.getUuids().contains(uuid)) {
mysql.update(uuid, "PlayerName", new DataValueString(player));
}
ArrayList<Column> data = mysql.getExactQuery(new Column("uuid", new DataValueString(uuid)));
int allTimeTotal = getValue(data, "AllTimeTotal", 1);
int monthTotal = getValue(data, "MonthTotal", 1);
int weeklyTotal = getValue(data, "WeeklyTotal", 1);
int dailyTotal = getValue(data, "DailyTotal", 1);
int points = getValue(data, "Points", getConfig().getPointsOnVote());
int milestoneCount = getValue(data, "MilestoneCount", 1);
text = new BungeeMessageData(allTimeTotal, monthTotal, weeklyTotal, dailyTotal, points, milestoneCount,
votePartyVotes, currentVotePartyVotesRequired);
ArrayList<Column> update = new ArrayList<Column>();
update.add(new Column("AllTimeTotal", new DataValueInt(allTimeTotal)));
update.add(new Column("MonthTotal", new DataValueInt(monthTotal)));
update.add(new Column("WeeklyTotal", new DataValueInt(weeklyTotal)));
update.add(new Column("DailyTotal", new DataValueInt(dailyTotal)));
update.add(new Column("Points", new DataValueInt(points)));
update.add(new Column("MilestoneCount", new DataValueInt(milestoneCount)));
debug("Setting totals " + text.toString());
mysql.update(uuid, update);
} else {
text = new BungeeMessageData(0, 0, 0, 0, 0, 0, votePartyVotes, currentVotePartyVotesRequired);
}
long time = LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
@@ -923,6 +955,10 @@ public class VotingPluginBungee extends Plugin implements Listener {
} else if (method.equals(BungeeMethod.SOCKETS)) {
sendSocketVote(player, service, text);
}
if (getConfig().getRedisSupport() && getConfig().getPrimaryServer()) {
sendRedisServerMessage("Vote", uuid, player, service, "" + votePartyVotes,
"" + currentVotePartyVotesRequired, "" + time, "" + realVote, text.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
@@ -28,7 +28,7 @@ public class VotingPluginBungeeCommand extends Command {
if (args.length >= 2) {
String user = args[1];
String site = args[2];
bungee.vote(user, site, false);
bungee.vote(user, site, false, null, null);
sender.sendMessage(new TextComponent("Sending vote"));
}
}
@@ -142,8 +142,9 @@ public class VotingPluginVelocity {
}
if (p == null || !p.isActive()) {
toSend = false;
} else if (p != null && p.isActive() && !p.getCurrentServer().get().getServerInfo()
.getName().equals(serverToCheck.getServerInfo().getName())) {
} else if (p != null && p.isActive()
&& (!p.getCurrentServer().isPresent() || !p.getCurrentServer().get().getServerInfo()
.getName().equals(serverToCheck.getServerInfo().getName()))) {
toSend = false;
}
@@ -578,11 +579,13 @@ public class VotingPluginVelocity {
}
}
}
currentVotePartyVotesRequired = getConfig().getVotePartyVotesRequired()
+ voteCacheFile.getVotePartyInreaseVotesRequired();
votePartyVotes = voteCacheFile.getVotePartyCurrentVotes();
}
currentVotePartyVotesRequired = getConfig().getVotePartyVotesRequired()
+ voteCacheFile.getVotePartyInreaseVotesRequired();
votePartyVotes = voteCacheFile.getVotePartyCurrentVotes();
try {
getVersionFile();
@@ -371,14 +371,14 @@ public class CommandLoader {
@Override
public void execute(CommandSender sender, String[] args) {
VotingPluginUser user = UserManager.getInstance().getVotingPluginUser(args[1]);
user.cache();
int newTotal = 0;
synchronized (pointLock) {
VotingPluginUser user = UserManager.getInstance().getVotingPluginUser(args[1]);
user.cache();
int newTotal = 0;
newTotal = user.addPoints(Integer.parseInt(args[3]));
sender.sendMessage(StringParser.getInstance().colorize("&cGave " + args[1] + " " + args[3]
+ " points" + ", " + args[1] + " now has " + newTotal + " points"));
}
sender.sendMessage(StringParser.getInstance().colorize("&cGave " + args[1] + " " + args[3]
+ " points" + ", " + args[1] + " now has " + newTotal + " points"));
}
});
@@ -1280,8 +1280,8 @@ public class CommandLoader {
@Override
public void execute(CommandSender sender, String[] args) {
plugin.getServerData().setVotePartyExtraRequired(Integer.parseInt(args[1]));
sendMessage(sender, "&cSet VotePartyExtraRequired to " + args[1]);
plugin.getServerData().setVotePartyExtraRequired(Integer.parseInt(args[2]));
sendMessage(sender, "&cSet VotePartyExtraRequired to " + args[2]);
}
});
@@ -15,6 +15,7 @@ import com.bencodez.advancedcore.api.messages.StringParser;
import com.bencodez.advancedcore.api.misc.ArrayUtils;
import com.bencodez.votingplugin.VotingPluginMain;
import com.bencodez.votingplugin.objects.VoteSite;
import com.bencodez.votingplugin.user.UserManager;
import com.bencodez.votingplugin.user.VotingPluginUser;
public class VoteLast extends GUIHandler {
@@ -67,8 +68,24 @@ public class VoteLast extends GUIHandler {
.setLore(user.voteCommandLastGUILine(site)).setAmountNone(1), 1000, 1000) {
@Override
public void onClick(ClickEvent clickEvent) {
public void onClick(ClickEvent event) {
if (plugin.getGui().isChestVoteLastClickableLinks()) {
Player player = event.getPlayer();
if (player != null) {
VotingPluginUser user = UserManager.getInstance().getVotingPluginUser(player);
user.sendMessage(
StringParser.getInstance()
.replacePlaceHolder(
StringParser.getInstance().replacePlaceHolder(
StringParser.getInstance()
.replacePlaceHolder(plugin.getGui()
.getChestVoteURLURLText(),
"voteurl", site.getVoteURL()),
"sitename", site.getDisplayName()),
"player", player.getName()));
}
}
}
@Override
@@ -73,6 +73,10 @@ public class Config extends YMLFile {
@Getter
private boolean alwaysWaitForCachePlaceholders = false;
@ConfigDataBoolean(path = "AlwaysProcessPlaceholders")
@Getter
private boolean alwaysProcessPlaceholders = false;
@ConfigDataBoolean(path = "AutoCreateVoteSites")
@Getter
private boolean autoCreateVoteSites = true;
@@ -130,12 +130,12 @@ public class ConfigVoteSites extends YMLFile {
* @param siteName the site name
* @return the vote delay
*/
public int getVoteDelay(String siteName) {
return getData(siteName).getInt("VoteDelay", 24);
public double getVoteDelay(String siteName) {
return getData(siteName).getDouble("VoteDelay", 24);
}
public int getVoteDelayMin(String siteName) {
return getData(siteName).getInt("VoteDelayMin", 0);
public double getVoteDelayMin(String siteName) {
return getData(siteName).getDouble("VoteDelayMin", 0);
}
/**
@@ -199,7 +199,9 @@ public class ConfigVoteSites extends YMLFile {
if (!siteCheck(site)) {
plugin.getLogger().warning("Failed to load site " + site + ", see above");
} else {
voteSites.add(new VoteSite(plugin, site));
VoteSite voteSite = new VoteSite(plugin, site);
plugin.debug(voteSite.loadingDebug());
voteSites.add(voteSite);
}
}
}
@@ -393,7 +395,7 @@ public class ConfigVoteSites extends YMLFile {
* @param siteName the site name
* @param voteDelay the vote delay
*/
public void setVoteDelay(String siteName, int voteDelay) {
public void setVoteDelay(String siteName, double voteDelay) {
set(siteName, "VoteDelay", voteDelay);
}
@@ -146,6 +146,10 @@ public class GUI extends YMLFile {
@Getter
private boolean lastMonthGUI = false;
@ConfigDataBoolean(path = "CHEST.VoteLast.ClickableLinks")
@Getter
private boolean chestVoteLastClickableLinks = true;
private VotingPluginMain plugin;
public GUI(VotingPluginMain plugin) {
@@ -91,7 +91,7 @@ public class VotiferEvent implements Listener {
if (plugin.getConfigFile().isAutoCreateVoteSites() && createSite) {
plugin.getLogger().warning("VoteSite with service site '" + voteSiteNameStr
+ "' does not exist, attempting to generaterate...");
+ "' does not exist, attempting to generate...");
plugin.getConfigVoteSites().generateVoteSite(voteSiteNameStr);
plugin.getLogger().info("Current known service sites: "
@@ -239,4 +239,19 @@ public class VoteSite {
return ArrayUtils.getInstance().containsIgnoreCase(plugin.getServerData().getServiceSites(), getServiceSite());
}
public String loadingDebug() {
String str = "Loading votesite key: " + key;
str += ", Displayname: " + displayName;
str += ", VoteDelay: " + getVoteDelay();
str += ", VoteDelayMin: " + getVoteDelayMin();
str += ", VoteDelayDaily: " + isVoteDelayDaily();
str += ", IsWaitUntilVoteDelay: " + isWaitUntilVoteDelay();
str += ", ServiceSite: " + getServiceSite();
str += ", TimeOffSet:" + getTimeOffSet();
str += ", Url: " + getVoteURL();
str += ", IgnoreCanVote: " + isIgnoreCanVote();
str += ", Hidden: " + isHidden();
return str;
}
}
@@ -85,7 +85,9 @@ public class PlaceHolders {
if (plugin.getConfigFile().isAutoCachePlaceholders()) {
placeholdersToSetCacheOn.add(identifier);
}
return "..";
if (!plugin.getConfigFile().isAlwaysProcessPlaceholders()) {
return "..";
}
}
}
}
@@ -103,7 +105,11 @@ public class PlaceHolders {
if (cache.containsKey(p.getUniqueId())) {
return cache.get(p.getUniqueId());
} else {
return "....";
if (!plugin.getConfigFile().isAlwaysProcessPlaceholders()) {
return "....";
} else {
return placeholder.placeholderRequest(user, identifier);
}
}
} else {
return placeholder.placeholderRequest(user, identifier);
@@ -45,7 +45,7 @@ public class UserManager {
manager.addKey(new UserDataKeyInt("DayVoteStreak"));
manager.addKey(new UserDataKeyInt("BestDayVoteStreak"));
manager.addKey(new UserDataKeyString("DayVoteStreakLastUpdate").setColumnType("MEDIUMTEXT"));
manager.addKey(new UserDataKeyString("GottenMileStones").setColumnType("MEDIUMTEXT"));
manager.addKey(new UserDataKeyString("GottenMileStones").setColumnType("LONGTEXT"));
manager.addKey(new UserDataKeyString("Reminded").setColumnType("VARCHAR(5)"));
manager.addKey(new UserDataKeyString("DisableBroadcast").setColumnType("VARCHAR(5)"));
manager.addKey(new UserDataKeyInt("WeekVoteStreak"));