Package com.bencodez.votingplugin.user
Class VotingPluginUser
java.lang.Object
com.bencodez.advancedcore.api.user.AdvancedCoreUser
com.bencodez.votingplugin.user.VotingPluginUser
public class VotingPluginUser
extends com.bencodez.advancedcore.api.user.AdvancedCoreUser
The Class User.
-
Constructor Summary
ConstructorDescriptionVotingPluginUser
(VotingPluginMain plugin, com.bencodez.advancedcore.api.user.AdvancedCoreUser user) VotingPluginUser
(VotingPluginMain plugin, String playerName) Deprecated.VotingPluginUser
(VotingPluginMain plugin, UUID uuid) Deprecated.VotingPluginUser
(VotingPluginMain plugin, UUID uuid, boolean loadName) Deprecated.VotingPluginUser
(VotingPluginMain plugin, UUID uuid, String playerName) Deprecated.VotingPluginUser
(VotingPluginMain plugin, org.bukkit.entity.Player player) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
addOfflineVote
(String voteSiteName) void
Adds the points.int
addPoints
(int value) Adds the points.int
addPoints
(int value, boolean async) void
addTotal()
Adds the total.void
Adds the total daily.void
Adds the total weekly.void
void
bungeeVote
(String service, BungeeMessageData text, boolean setTotals) void
bungeeVoteOnline
(String service, BungeeMessageData text, boolean setTotals) void
bungeeVotePluginMessaging
(String service, long time, BungeeMessageData text, boolean setTotals, boolean wasOnline, boolean broadcast, int num) boolean
Can vote all.boolean
boolean
canVoteSite
(VoteSite voteSite) Can vote site.boolean
Check all votes.boolean
void
checkDayVoteStreak
(boolean forceBungee) void
void
int
Deprecated.int
int
int
boolean
boolean
getCoolDownCheckSite
(VoteSite site) int
Deprecated.int
long
boolean
int
int
int
int
int
int
long
getLastVoteTimer
(VoteSite voteSite) Gets the last vote times sorted.int
int
Deprecated.int
int
long
long
int
int
Gets the points.int
int
long
Gets the time.int
int
int
getVoteShopIdentifierLimit
(String identifier) int
Deprecated.int
void
giveDailyTopVoterAward
(int place, String path) void
giveMonthlyTopVoterAward
(int place, String path) void
giveWeeklyTopVoterAward
(int place, String path) boolean
Checks for gotten first vote.boolean
boolean
hasGottenMilestone
(int votesRequired) Checks for gotten milestone.boolean
hasPercentageTotal
(TopVoter top, double percentage, LocalDateTime time) boolean
boolean
boolean
void
Login message.void
void
void
void
offlineBroadcast
(VotingPluginUser user, boolean checkBungee, int numberOfVotes) void
offVote()
Off vote.void
playerVote
(VoteSite voteSite, boolean online, boolean broadcast, boolean bungee) boolean
removePoints
(int points) Removes the points.boolean
removePoints
(int points, boolean async) void
void
resetLastVoted
(VoteSite site) void
resetTotals
(TopVoter topVoter) void
sendVoteEffects
(boolean online) Send vote effects.void
setAllTimeTotal
(int allTimeTotal) Deprecated.void
setBestDayVoteStreak
(int streak) void
setBestMonthVoteStreak
(int streak) void
setBestWeekVoteStreak
(int streak) void
setCoolDownCheck
(boolean coolDownCheck) void
setCoolDownCheckSite
(VoteSite site, boolean value) void
setCoolDownCheckSite
(HashMap<String, Boolean> coolDownChecks) void
setDailyTotal
(int total) Deprecated.void
setDayVoteStreak
(int streak) void
setDayVoteStreakLastUpdate
(long time) void
setDisableBroadcast
(boolean value) void
setGottenAllSitesDay
(int day) void
setGottenAlmostAllSitesDay
(int day) void
setHasGotteMilestone
(int votesRequired, boolean b) void
setHasGottenMilestone
(HashMap<String, Boolean> hasGottenMilestone) void
setHighestDailyTotal
(int total) void
setHighestMonthlyTotal
(int total) void
setHighestWeeklyTotal
(int total) void
setLastMonthTotal
(int total) void
setLastVotes
(HashMap<VoteSite, Long> lastVotes) void
setMilestoneCount
(int value) void
setMonthTotal
(int total) Deprecated.void
setMonthVoteStreak
(int streak) void
setOfflineVotes
(ArrayList<String> offlineVotes) void
setPoints
(int value) Sets the points.void
setPoints
(int value, boolean async) void
setPrimaryAccount
(UUID uuid) void
setReminded
(boolean reminded) void
void
void
setTopVoterIgnore
(boolean topVoterIgnore) void
void
setVotePartyVotes
(int value) void
setVoteShopIdentifierLimit
(String identifier, int value) void
setWeeklyTotal
(int total) Deprecated.void
setWeekVoteStreak
(int streak) boolean
voteCommandLastDate
(VoteSite voteSite) Deprecated.voteCommandLastDuration
(VoteSite voteSite) voteCommandLastGUILine
(VoteSite voteSite) voteCommandLastLine
(VoteSite voteSite) voteCommandNextInfo
(VoteSite voteSite) voteCommandNextInfo
(VoteSite voteSite, long time) long
voteNextDurationTime
(VoteSite voteSite) long
voteNextDurationTime
(VoteSite voteSite, long time) boolean
Methods inherited from class com.bencodez.advancedcore.api.user.AdvancedCoreUser
addOfflineRewards, addPermission, addPermission, addTimedReward, addUnClaimedChoiceReward, cache, cacheAsync, cacheData, cacheIfNeeded, checkDelayedTimedRewards, checkOfflineRewards, clearCache, clearTempCache, closeInv, dontCache, forceRunOfflineRewards, getCache, getChoicePreference, getChoicePreferenceData, getData, getInputMethod, getJavaUUID, getLastOnline, getNumberOfDaysSinceLogin, getOfflinePlayer, getOfflineRewards, getPlayer, getPlayerHead, getPlayerName, getPlugin, getRepeatAmount, getTimedRewards, getUnClaimedChoices, getUserData, getUserInputMethod, getUUID, giveExp, giveExpLevels, giveItem, giveItem, giveItem, giveItems, giveMoney, giveMoney, givePotionEffect, giveReward, giveReward, hasChoices, hasLoggedOnBefore, hasPermission, isBanned, isBedrockPlayer, isCached, isCacheData, isCheckWorld, isInWorld, isInWorld, isOnline, isTempCache, isVanished, isWaitForCache, loadCache, loadData, loadTimedDelayedTimer, playEffect, playParticle, playParticleEffect, playSound, preformCommand, preformCommand, remove, removePermission, removeUnClaimedChoiceReward, sendActionBar, sendBossBar, sendJson, sendJson, sendJson, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendTitle, setCheckWorld, setChoicePreference, setInputMethod, setLastOnline, setOfflineRewards, setPlayerName, setRepeatAmount, setTimedRewards, setUnClaimedChoice, setUserInputMethod, setUUID, setWaitForCache, tempCache, updateName, updateTempCacheWithColumns
-
Constructor Details
-
VotingPluginUser
Deprecated. -
VotingPluginUser
Deprecated. -
VotingPluginUser
Deprecated. -
VotingPluginUser
Deprecated. -
VotingPluginUser
Deprecated. -
VotingPluginUser
public VotingPluginUser(VotingPluginMain plugin, com.bencodez.advancedcore.api.user.AdvancedCoreUser user)
-
-
Method Details
-
addAllTimeTotal
public void addAllTimeTotal() -
addDayVoteStreak
public void addDayVoteStreak() -
addMonthTotal
public void addMonthTotal() -
addMonthVoteStreak
public void addMonthVoteStreak() -
addOfflineVote
-
addPoints
public void addPoints()Adds the points. -
addPoints
public int addPoints(int value) Adds the points.- Parameters:
value
- the value- Returns:
- current total points
-
addPoints
public int addPoints(int value, boolean async) -
addTotal
public void addTotal()Adds the total. -
addTotalDaily
public void addTotalDaily()Adds the total daily. -
addTotalWeekly
public void addTotalWeekly()Adds the total weekly. -
addWeekVoteStreak
public void addWeekVoteStreak() -
bungeeVote
-
bungeeVoteOnline
-
bungeeVotePluginMessaging
public void bungeeVotePluginMessaging(String service, long time, BungeeMessageData text, boolean setTotals, boolean wasOnline, boolean broadcast, int num) -
canVoteAll
public boolean canVoteAll()Can vote all.- Returns:
- true, if successful
-
canVoteAny
public boolean canVoteAny() -
canVoteSite
Can vote site.- Parameters:
voteSite
- the vote site- Returns:
- true, if successful
-
checkAlmostAllVotes
public boolean checkAlmostAllVotes() -
checkAllVotes
public boolean checkAllVotes()Check all votes.- Returns:
- true, if successful
-
checkDayVoteStreak
public void checkDayVoteStreak(boolean forceBungee) -
clearOfflineVotes
public void clearOfflineVotes() -
clearTotals
public void clearTotals() -
getAllTimeTotal
Deprecated. -
getBestDayVoteStreak
public int getBestDayVoteStreak() -
getBestMonthVoteStreak
public int getBestMonthVoteStreak() -
getBestWeekVoteStreak
public int getBestWeekVoteStreak() -
getDailyTotal
Deprecated. -
getDayVoteStreak
public int getDayVoteStreak() -
getDayVoteStreakLastUpdate
public long getDayVoteStreakLastUpdate() -
getDisableBroadcast
public boolean getDisableBroadcast() -
getGottenAllSitesDay
public int getGottenAllSitesDay() -
getGottenAlmostAllSitesDay
public int getGottenAlmostAllSitesDay() -
getHasGottenMilestone
-
getHighestDailyTotal
public int getHighestDailyTotal() -
getHighestMonthlyTotal
public int getHighestMonthlyTotal() -
getHighestWeeklyTotal
public int getHighestWeeklyTotal() -
getLastMonthTotal
public int getLastMonthTotal() -
getCoolDownCheckSiteList
-
getCoolDownCheckSite
-
getLastVotes
-
getLastVoteTime
-
getLastVoteTimesSorted
Gets the last vote times sorted.- Returns:
- the last vote times sorted
-
getMilestoneCount
public int getMilestoneCount() -
getMonthTotal
Deprecated. -
getMonthVoteStreak
public int getMonthVoteStreak() -
getOfflineVotes
-
getPoints
public int getPoints()Gets the points.- Returns:
- the points
-
getPointsPath
-
getPrimaryAccount
-
getSitesVotedOn
public int getSitesVotedOn() -
getTime
Gets the time.- Parameters:
voteSite
- the vote site- Returns:
- the time
-
getTotal
-
getVotePartyVotes
public int getVotePartyVotes() -
getVoteShopIdentifierLimit
-
getWeeklyTotal
Deprecated. -
getWeekVoteStreak
public int getWeekVoteStreak() -
giveDailyTopVoterAward
-
giveMonthlyTopVoterAward
-
giveWeeklyTopVoterAward
-
hasGottenFirstVote
public boolean hasGottenFirstVote()Checks for gotten first vote.- Returns:
- true if user got the first vote reward
-
hasGottenFirstVoteToday
public boolean hasGottenFirstVoteToday() -
hasGottenMilestone
public boolean hasGottenMilestone(int votesRequired) Checks for gotten milestone.- Parameters:
votesRequired
- the votes required- Returns:
- true, if successful
-
hasPercentageTotal
-
hasPrimaryAccount
public boolean hasPrimaryAccount() -
isReminded
public boolean isReminded() -
isTopVoterIgnore
public boolean isTopVoterIgnore() -
loginMessage
public void loginMessage()Login message. -
loginRewards
public void loginRewards() -
logoutRewards
public void logoutRewards() -
offVote
public void offVote()Off vote. -
offlineBroadcast
-
playerVote
-
removePoints
public boolean removePoints(int points) Removes the points.- Parameters:
points
- the points- Returns:
- true, if successful
-
removePoints
public boolean removePoints(int points, boolean async) -
resetTotals
-
sendVoteEffects
public void sendVoteEffects(boolean online) Send vote effects.- Parameters:
online
- the online
-
setAllTimeTotal
Deprecated. -
setBestDayVoteStreak
public void setBestDayVoteStreak(int streak) -
setBestMonthVoteStreak
public void setBestMonthVoteStreak(int streak) -
setBestWeekVoteStreak
public void setBestWeekVoteStreak(int streak) -
setDailyTotal
Deprecated. -
setDayVoteStreak
public void setDayVoteStreak(int streak) -
setDayVoteStreakLastUpdate
public void setDayVoteStreakLastUpdate(long time) -
setDisableBroadcast
public void setDisableBroadcast(boolean value) -
setGottenAllSitesDay
public void setGottenAllSitesDay(int day) -
setGottenAlmostAllSitesDay
public void setGottenAlmostAllSitesDay(int day) -
setHasGotteMilestone
public void setHasGotteMilestone(int votesRequired, boolean b) -
setHasGottenMilestone
-
getGottenMilestonesPath
-
setHighestDailyTotal
public void setHighestDailyTotal(int total) -
setHighestMonthlyTotal
public void setHighestMonthlyTotal(int total) -
setHighestWeeklyTotal
public void setHighestWeeklyTotal(int total) -
setLastMonthTotal
public void setLastMonthTotal(int total) -
setLastVotes
-
setCoolDownCheckSite
-
setCoolDownCheckSite
-
setMilestoneCount
public void setMilestoneCount(int value) -
getCoolDownCheckPath
-
getCoolDownCheckSitePath
-
setCoolDownCheck
public void setCoolDownCheck(boolean coolDownCheck) -
getCoolDownCheck
public boolean getCoolDownCheck() -
setMonthTotal
Deprecated. -
setMonthVoteStreak
public void setMonthVoteStreak(int streak) -
setOfflineVotes
-
setPoints
public void setPoints(int value) Sets the points.- Parameters:
value
- the new points
-
setPoints
public void setPoints(int value, boolean async) -
setPrimaryAccount
-
getNextAvailableMileStone
public int getNextAvailableMileStone() -
setReminded
public void setReminded(boolean reminded) -
setTime
-
setTime
-
setTopVoterIgnore
public void setTopVoterIgnore(boolean topVoterIgnore) -
setTotal
-
setVotePartyVotes
public void setVotePartyVotes(int value) -
setVoteShopIdentifierLimit
-
setWeeklyTotal
Deprecated. -
setWeekVoteStreak
public void setWeekVoteStreak(int streak) -
shouldBeReminded
public boolean shouldBeReminded() -
voteCommandLastDate
Deprecated. -
voteCommandLastDuration
-
voteCommandLastGUILine
-
voteCommandLastLine
-
voteCommandNextInfo
-
voteCommandNextInfo
-
voteNextDurationTime
-
voteNextDurationTime
-
voteStreakUpdatedToday
-
getSitesNotVotedOn
public int getSitesNotVotedOn() -
getTopVoterPlayer
-
getNextTimeAllSitesAvailable
public long getNextTimeAllSitesAvailable() -
getNextTimeFirstSiteAvailable
public long getNextTimeFirstSiteAvailable() -
resetLastVoted
public void resetLastVoted() -
resetLastVoted
-
getNumberOfOfflineVotes
-
getLastVoteTimer
-
mergeData
-