public class UltimateVotesAPI
extends java.lang.Object
Constructor and Description |
---|
UltimateVotesAPI() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Long |
getLastUpdatedTime()
get the last time the cached values were updated from the database
|
java.util.ArrayList<java.util.UUID> |
getListOfPlayersWhoHaveNotVotedToday()
hooks into the plugins way of keeping track of the list of online players
that have note voted today requires no need to access the database safe to use
in sync with the main server thread
|
java.util.ArrayList<java.util.UUID> |
getListOfPlayersWhoHaveVotedToday()
hooks into the plugins way of keeping track of the list of online players
that have voted today requires no need to access the database safe to use
in sync with the main server thread
|
static int |
getPlayerAllTimeVotes(java.lang.String playername)
get the players total votes in total
accesses the database, should be called async, not on the main server thread!
|
static int |
getPlayerAllTimeVotes(java.util.UUID playerUUID)
get the players total votes in total
accesses the database, should be called async, not on the main server thread!
|
static int |
getPlayerMonthlyVotes(java.lang.String playername)
get the players vote count by username
accesses the database, should be called async, not on the main server thread!
|
static int |
getPlayerMonthlyVotes(java.util.UUID playerUUID)
get the players monthly votes count
accesses the database, should be called async, not on the main server thread!
|
static int |
getPlayerTotalVotes(java.lang.String playername)
Deprecated.
|
static int |
getPlayerTotalVotes(java.util.UUID playerUUID)
Deprecated.
|
static int |
getPlayerUnclaimedVotes(java.util.UUID playerUUID)
Get the players unclaimed vote count
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopPlayers()
Deprecated.
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopPlayersCached()
Deprecated.
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopVotersAllTime()
get the top 10 voters all time from the database
accesses the database, should be called async, not on the main server thread!
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopVotersAllTime(int limit)
get the top all time voters based on a limit passed in
accesses the database, should be called async, not on the main server thread!
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopVotersAllTimeCached()
get the top 10 all time voters from the cached value from the database
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopVotersMonthly()
get the top 10 voters from the database
accesses the database, should be called async, not on the main server thread!
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopVotersMonthly(int limit)
get the top monthly voters based on a limit passed in
accesses the database, should be called async, not on the main server thread!
|
static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getTopVotersMonthlyCached()
get the top 10 monthly voters from the cached value from the database
|
static boolean |
hasVotedToday(java.lang.String playername)
has the player voted today
accesses the database, should be called async, not on the main server thread!
|
static boolean |
hasVotedToday(java.util.UUID playerUUID)
has the player voted today
accesses the database, should be called async, not on the main server thread!
|
static boolean |
hasVotedTodayCached(java.util.UUID playerUUID)
hooks into the plugins way of keeping track of if a player has voted today
requires no need to access the database safe to use in sync with the main
server thread
|
static java.sql.ResultSet |
performDatabaseQuery(java.lang.String query)
perform a mysql query on the database of ultimatevotes
please remember the structure of the database can change
breaking code relying on this, please only use this as
as last resort for something the API does not provide
accesses the database, should be called async, not on the main server thread!
|
public static int getPlayerMonthlyVotes(java.util.UUID playerUUID)
playerUUID
- the players UUIDpublic static int getPlayerUnclaimedVotes(java.util.UUID playerUUID)
playerUUID
- the players UUIDpublic static int getPlayerMonthlyVotes(java.lang.String playername)
playername
- the players usernamepublic static int getPlayerAllTimeVotes(java.util.UUID playerUUID)
playerUUID
- the players UUIDpublic static int getPlayerAllTimeVotes(java.lang.String playername)
playername
- the players usernamepublic static boolean hasVotedToday(java.util.UUID playerUUID)
playerUUID
- the player UUIDpublic static boolean hasVotedTodayCached(java.util.UUID playerUUID)
playerUUID
- the player uuid to check if they have voted todaypublic java.util.ArrayList<java.util.UUID> getListOfPlayersWhoHaveVotedToday()
public java.util.ArrayList<java.util.UUID> getListOfPlayersWhoHaveNotVotedToday()
public static boolean hasVotedToday(java.lang.String playername)
playername
- the players usernamepublic static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopVotersMonthly()
public static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopVotersAllTime()
public static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopVotersMonthly(int limit)
limit
- the limit of the top voterspublic static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopVotersAllTime(int limit)
limit
- the limit of the top voterspublic static java.sql.ResultSet performDatabaseQuery(java.lang.String query)
query
- the mysql querypublic static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopVotersMonthlyCached()
public static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopVotersAllTimeCached()
public static java.lang.Long getLastUpdatedTime()
@Deprecated public static int getPlayerTotalVotes(java.util.UUID playerUUID)
playerUUID
- the players UUID@Deprecated public static int getPlayerTotalVotes(java.lang.String playername)
playername
- the players username@Deprecated public static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopPlayers()
@Deprecated public static java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getTopPlayersCached()