Class OfflineSDBPlayer
java.lang.Object
nl.minetopiasdb.api.playerdata.objects.OfflineSDBPlayer
- All Implemented Interfaces:
SDBPlayer
OfflineSDBPlayer object
NOTE: All sets are ran asynchronously, but data loading is not. Instantiate
asynchronously!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the citycolor of this SDBPlayer.longThe value ofSystem.currentTimeMillis()when the deathban of this SDBPlayer expires.Get the fitness object of this SDBPlayer.doubleGet the amount of goldshards this SDBPlayer has.Get a formatted string that represents the amount of goldshards this SDBPlayer has.intGet the amount of graycoins this SDBPlayer has.doubleGet the amount of grayshards this SDBPlayer has.Get a formatted string that represents the amount of grayshards this SDBPlayer has.Get the possibly null UUID of the player who handcuffed this SDBPlayer.intgetLevel()Get the level of this SDBPlayer.Get the levelcolor of this SDBPlayer.doubleGet the amount of luckyshards this SDBPlayer has.Get a formatted string that represents the amount of luckyshards this SDBPlayer has.Get the prefix of this SDBPlayer.Get the prefixcolor of this SDBPlayer.Get the current selected chatcolor of this player.intGet the online days of this SDBPlayer.intGet the online hours of this SDBPlayer.intGet the online minutes of this SDBPlayer.intGet the online seconds of this SDBPlayer.getUUID()Get the UUID of this SDBPlayer.voidhandcuffPlayer(UUID handcuffedBy) Handcuff a player.booleanSee if this SDBPlayer has chatspy enabled.booleanSee if this SDBPlayer has commandspy enabled.booleanCheck if player has a pending fitness resetbooleanSee if this SDBPlayer has staffchat muted.booleanCheck if player is handcuffed.voidmuteStaffChat(boolean muted) Mute or unmute staffchat for this SDBPlayer.voidmuteStaffChatSilent(boolean muted) Mute or unmute staffchat for this SDBPlayer without communicating it through message channels.voidPull all the data from the database.voidreset()Reset the MinetopiaSDB playerdata of this player, this does not includes fitnessdata.voidsetChatSpy(boolean chatspy) Enable or disable chatspy for this SDBPlayer.voidsetChatSpySilent(boolean chatspy) Enable or disable chatspy for this SDBPlayer without communicating it through message channels.voidsetCitycolor(String citycolor) Change the citycolor of this SDBPlayer.voidsetCitycolorSilent(String citycolor) Change the citycolor of this SDBPlayer without communicating it through message channels.voidsetCommandSpy(boolean commandspy) Enable or disable commandspy for this SDBPlayer.voidsetCommandSpySilent(boolean commandspy) Enable or disable commandspy for this SDBPlayer without communicating it through message channels.voidsetDeathbanTime(long deathbanmillis) Change until what value ofSystem.currentTimeMillis()the deathban of this SDBPlayer expires.voidsetDeathbanTimeSilent(long deathbanmillis) Change until what value ofSystem.currentTimeMillis()the deathban of this SDBPlayer expires without communicating it through message channels.voidsetFitness(Fitness fitness) Change the fitness object of this SDBPlayer.voidsetFitnessReset(boolean fitnessreset) Enable or disable a fitnessreset for this SDBPlayer.voidsetFitnessResetSilent(boolean fitnessreset) Enable or disable a fitnessreset for this SDBPlayer without communicating it through message channels.voidsetGoldShards(double goldshards) Change the amount of goldshards this SDBPlayer has.voidsetGoldShardsSilent(double goldshards) Change the amount of goldshards this SDBPlayer has without communicating it through message channels.voidsetGrayCoins(int graycoins) Change the amount of graycoins this SDBPlayer has.voidsetGrayCoinsSilent(int graycoins) Change the amount of grayoincs this SDBPlayer has without communicating it through message channels.voidsetGrayShards(double grayshards) Change the amount of grayshards this SDBPlayer has.voidsetGrayShardsSilent(double grayshards) Change the amount of grayshards this SDBPlayer has without communicating it through message channels.voidsetLevel(int level, LevelChangeReason reason) Change the level of this SDBPlayer.voidsetLevelColor(String levelcolor) Change the levelcolor of this SDBPlayer.voidsetLevelColorSilent(String levelcolor) Change the levelcolor of this SDBPlayer without communicating it through message channels.voidsetLevelSilent(int level) Change the level of this SDBPlayer without communicating it through message channels.voidsetLuckyShards(double luckyshards) Change the amount of luckyshards this SDBPlayer has.voidsetLuckyShardsSilent(double luckyshards) Change the amount of luckyshards this SDBPlayer has without communicating it through message channels.voidChange the prefix of this SDBPlayer.voidsetPrefixColor(String prefixcolor) Change the prefixcolor of this SDBPlayer.voidsetPrefixColorSilent(String prefixcolor) Change the prefixcolor of this SDBPlayer without communicating it through message channels.voidsetPrefixSilent(String prefix) Change the prefix of this SDBPlayer without communicating it through message channels.voidsetSelectedChatColor(String selectedChatcolor) Change the selected chatcolor of this SDBPlayer.voidsetSelectedChatColorSilent(String selectedChatcolor) Change the selected chatcolor of this SDBPlayer without communicating it through message channels.voidsetTimeDays(int days) Change the online days of this SDBPlayer.voidsetTimeDaysSilent(int days) Change the online days of this SDBPlayer without communicating it through message channels.voidsetTimeHours(int hours) Change the online hours of this SDBPlayer.voidsetTimeHoursSilent(int hours) Change the online hours of this SDBPlayer without communicating it through message channels.voidsetTimeMinutes(int minutes) Change the online minutes of this SDBPlayer.voidsetTimeMinutesSilent(int minutes) Change the online minutes of this SDBPlayer without communicating it through message channels.voidsetTimeSeconds(int seconds) Change the online seconds of this SDBPlayer.voidsetTimeSecondsSilent(int seconds) Change the online seconds of this SDBPlayer without communicating it through message channels.voidRemove the handcuffs from a player.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.minetopiasdb.api.playerdata.objects.SDBPlayer
isWearingBivak
-
Constructor Details
-
OfflineSDBPlayer
-
-
Method Details
-
reloadDataFromDB
public void reloadDataFromDB()Pull all the data from the database. NOTE: Call this method async. -
getUUID
Get the UUID of this SDBPlayer. -
getPrefix
Get the prefix of this SDBPlayer. -
setPrefix
Change the prefix of this SDBPlayer. -
getPrefixColor
Get the prefixcolor of this SDBPlayer.- Specified by:
getPrefixColorin interfaceSDBPlayer- Returns:
- the prefixcolor that this SDBPlayer has.
-
setPrefixColor
Change the prefixcolor of this SDBPlayer.- Specified by:
setPrefixColorin interfaceSDBPlayer- Parameters:
prefixcolor- New prefixcolor of this SDBPlayer.
-
getSelectedChatColor
Get the current selected chatcolor of this player.- Specified by:
getSelectedChatColorin interfaceSDBPlayer- Returns:
- currently selected chatcolor of this player.
-
setSelectedChatColor
Change the selected chatcolor of this SDBPlayer.- Specified by:
setSelectedChatColorin interfaceSDBPlayer- Parameters:
selectedChatcolor- the newly selected chatcolor of this player.
-
getCitycolor
Get the citycolor of this SDBPlayer.- Specified by:
getCitycolorin interfaceSDBPlayer- Returns:
- the citycolor that this SDBPlayer has.
-
setCitycolor
Change the citycolor of this SDBPlayer.- Specified by:
setCitycolorin interfaceSDBPlayer- Parameters:
citycolor- the new citycolor of this player.
-
getLevelColor
Get the levelcolor of this SDBPlayer.- Specified by:
getLevelColorin interfaceSDBPlayer- Returns:
- the levelcolor that this SDBPlayer has.
-
setLevelColor
Change the levelcolor of this SDBPlayer.- Specified by:
setLevelColorin interfaceSDBPlayer- Parameters:
levelcolor- the new levelcolor of this player.
-
getLevel
public int getLevel()Get the level of this SDBPlayer. -
setLevel
Change the level of this SDBPlayer. -
hasChatspy
public boolean hasChatspy()See if this SDBPlayer has chatspy enabled.- Specified by:
hasChatspyin interfaceSDBPlayer- Returns:
- true if player has chatspy enabled.
-
setChatSpy
public void setChatSpy(boolean chatspy) Enable or disable chatspy for this SDBPlayer.- Specified by:
setChatSpyin interfaceSDBPlayer- Parameters:
chatspy- True if player should have chatspy enabled, false if player shouldn't have it enabled.
-
hasFitnessReset
public boolean hasFitnessReset()Check if player has a pending fitness reset- Specified by:
hasFitnessResetin interfaceSDBPlayer- Returns:
- true if player has fitness reset
-
setFitnessReset
public void setFitnessReset(boolean fitnessreset) Enable or disable a fitnessreset for this SDBPlayer.- Specified by:
setFitnessResetin interfaceSDBPlayer- Parameters:
fitnessreset- True if player should have a pending fitnessreset, false if player shouldn't have one.
-
hasCommandSpy
public boolean hasCommandSpy()See if this SDBPlayer has commandspy enabled.- Specified by:
hasCommandSpyin interfaceSDBPlayer- Returns:
- true if player has commandspy enabled.
-
setCommandSpy
public void setCommandSpy(boolean commandspy) Enable or disable commandspy for this SDBPlayer.- Specified by:
setCommandSpyin interfaceSDBPlayer- Parameters:
commandspy- True if player should have commandspy enabled, false if player shouldn't have it enabled.
-
hasMutedStaffChat
public boolean hasMutedStaffChat()See if this SDBPlayer has staffchat muted.- Specified by:
hasMutedStaffChatin interfaceSDBPlayer- Returns:
- true if player has staffchat muted.
-
muteStaffChat
public void muteStaffChat(boolean muted) Mute or unmute staffchat for this SDBPlayer.- Specified by:
muteStaffChatin interfaceSDBPlayer- Parameters:
muted- True if player should have staffchat muted, false if player shouldn't have it muted.
-
getGrayCoins
public int getGrayCoins()Get the amount of graycoins this SDBPlayer has.- Specified by:
getGrayCoinsin interfaceSDBPlayer- Returns:
- the amount of graycoins that this SDBPlayer has.
-
setGrayCoins
public void setGrayCoins(int graycoins) Change the amount of graycoins this SDBPlayer has.- Specified by:
setGrayCoinsin interfaceSDBPlayer- Parameters:
graycoins- the new amount of graycoins this player has.
-
getGoldShards
public double getGoldShards()Get the amount of goldshards this SDBPlayer has.- Specified by:
getGoldShardsin interfaceSDBPlayer- Returns:
- the amount of goldshards that this SDBPlayer has.
-
getGoldShardsFormatted
Get a formatted string that represents the amount of goldshards this SDBPlayer has.- Specified by:
getGoldShardsFormattedin interfaceSDBPlayer- Returns:
- formatted string that represents the amount of goldshards.
-
setGoldShards
public void setGoldShards(double goldshards) Change the amount of goldshards this SDBPlayer has.- Specified by:
setGoldShardsin interfaceSDBPlayer- Parameters:
goldshards- the new amount of goldshards this player has.
-
getGrayShards
public double getGrayShards()Get the amount of grayshards this SDBPlayer has.- Specified by:
getGrayShardsin interfaceSDBPlayer- Returns:
- the amount of grayshards that this SDBPlayer has.
-
getGrayShardsFormatted
Get a formatted string that represents the amount of grayshards this SDBPlayer has.- Specified by:
getGrayShardsFormattedin interfaceSDBPlayer- Returns:
- formatted string that represents the amount of grayshards.
-
setGrayShards
public void setGrayShards(double grayshards) Change the amount of grayshards this SDBPlayer has.- Specified by:
setGrayShardsin interfaceSDBPlayer- Parameters:
grayshards- the new amount of grayshards this player has.
-
getLuckyShards
public double getLuckyShards()Get the amount of luckyshards this SDBPlayer has.- Specified by:
getLuckyShardsin interfaceSDBPlayer- Returns:
- the amount of luckyshards that this SDBPlayer has.
-
getLuckyShardsFormatted
Get a formatted string that represents the amount of luckyshards this SDBPlayer has.- Specified by:
getLuckyShardsFormattedin interfaceSDBPlayer- Returns:
- formatted string that represents the amount of luckyshards.
-
setLuckyShards
public void setLuckyShards(double luckyshards) Change the amount of luckyshards this SDBPlayer has.- Specified by:
setLuckyShardsin interfaceSDBPlayer- Parameters:
luckyshards- the new amount of luckyshards this player has.
-
getFitness
Get the fitness object of this SDBPlayer.- Specified by:
getFitnessin interfaceSDBPlayer- Returns:
- the fitness object of this SDBPlayer.
-
setFitness
Change the fitness object of this SDBPlayer.- Specified by:
setFitnessin interfaceSDBPlayer- Parameters:
fitness- The new fitness object for this SDBPlayer.
-
getTimeSeconds
public int getTimeSeconds()Get the online seconds of this SDBPlayer.- Specified by:
getTimeSecondsin interfaceSDBPlayer- Returns:
- the amount of online seconds this SDBPlayer has.
-
setTimeSeconds
public void setTimeSeconds(int seconds) Change the online seconds of this SDBPlayer.- Specified by:
setTimeSecondsin interfaceSDBPlayer- Parameters:
seconds- the new amount of online seconds for this SDBPlayer.
-
getTimeMinutes
public int getTimeMinutes()Get the online minutes of this SDBPlayer.- Specified by:
getTimeMinutesin interfaceSDBPlayer- Returns:
- the amount of online minutes this SDBPlayer has.
-
setTimeMinutes
public void setTimeMinutes(int minutes) Change the online minutes of this SDBPlayer.- Specified by:
setTimeMinutesin interfaceSDBPlayer- Parameters:
minutes- the new amount of online minutes for this SDBPlayer.
-
getTimeHours
public int getTimeHours()Get the online hours of this SDBPlayer.- Specified by:
getTimeHoursin interfaceSDBPlayer- Returns:
- the amount of online hours this SDBPlayer has.
-
setTimeHours
public void setTimeHours(int hours) Change the online hours of this SDBPlayer.- Specified by:
setTimeHoursin interfaceSDBPlayer- Parameters:
hours- the new amount of online hours for this SDBPlayer.
-
getTimeDays
public int getTimeDays()Get the online days of this SDBPlayer.- Specified by:
getTimeDaysin interfaceSDBPlayer- Returns:
- the amount of online days this SDBPlayer has.
-
setTimeDays
public void setTimeDays(int days) Change the online days of this SDBPlayer.- Specified by:
setTimeDaysin interfaceSDBPlayer- Parameters:
days- the new amount of online days for this SDBPlayer.
-
setPrefixSilent
Change the prefix of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setPrefix(String)instead.- Specified by:
setPrefixSilentin interfaceSDBPlayer- Parameters:
prefix- New prefix of this SDBPlayer.
-
setPrefixColorSilent
Change the prefixcolor of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setPrefixColor(String)instead.- Specified by:
setPrefixColorSilentin interfaceSDBPlayer- Parameters:
prefixcolor- New prefixcolor of this SDBPlayer.
-
setSelectedChatColorSilent
Change the selected chatcolor of this SDBPlayer without communicating it through message channels.SDBPlayer.setSelectedChatColor(String)- Specified by:
setSelectedChatColorSilentin interfaceSDBPlayer- Parameters:
selectedChatcolor- New prefix of this SDBPlayer.
-
setCitycolorSilent
Change the citycolor of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setCitycolor(String)instead.- Specified by:
setCitycolorSilentin interfaceSDBPlayer- Parameters:
citycolor- the new citycolor of this SDBPlayer.
-
setLevelColorSilent
Change the levelcolor of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setLevelColor(String)instead.- Specified by:
setLevelColorSilentin interfaceSDBPlayer- Parameters:
levelcolor- the new levelcolor of this SDBPlayer.
-
setLevelSilent
public void setLevelSilent(int level) Change the level of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setLevel(int, LevelChangeReason)instead.- Specified by:
setLevelSilentin interfaceSDBPlayer- Parameters:
level- the new level of this player.
-
setChatSpySilent
public void setChatSpySilent(boolean chatspy) Enable or disable chatspy for this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setChatSpy(boolean)instead.- Specified by:
setChatSpySilentin interfaceSDBPlayer- Parameters:
chatspy- True if player should have chatspy enabled, false if player shouldn't have it enabled.
-
setFitnessResetSilent
public void setFitnessResetSilent(boolean fitnessreset) Enable or disable a fitnessreset for this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setFitnessResetSilent(boolean)instead.- Specified by:
setFitnessResetSilentin interfaceSDBPlayer- Parameters:
fitnessreset- True if player should have a pending fitnessreset, false if player shouldn't have one.s
-
setCommandSpySilent
public void setCommandSpySilent(boolean commandspy) Enable or disable commandspy for this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setCommandSpy(boolean)instead.- Specified by:
setCommandSpySilentin interfaceSDBPlayer- Parameters:
commandspy- True if player should have commandspy enabled, false if player shouldn't have it enabled.
-
muteStaffChatSilent
public void muteStaffChatSilent(boolean muted) Mute or unmute staffchat for this SDBPlayer without communicating it through message channels. Please useSDBPlayer.muteStaffChat(boolean)instead.- Specified by:
muteStaffChatSilentin interfaceSDBPlayer- Parameters:
muted- True if player should have staffchat muted, false if player shouldn't have it muted.
-
setGrayCoinsSilent
public void setGrayCoinsSilent(int graycoins) Change the amount of grayoincs this SDBPlayer has without communicating it through message channels. Please useSDBPlayer.setGrayCoins(int)instead.- Specified by:
setGrayCoinsSilentin interfaceSDBPlayer- Parameters:
graycoins- the new amount of graycoins this player has.
-
setGoldShardsSilent
public void setGoldShardsSilent(double goldshards) Change the amount of goldshards this SDBPlayer has without communicating it through message channels. Please useSDBPlayer.setGoldShards(double)instead.- Specified by:
setGoldShardsSilentin interfaceSDBPlayer- Parameters:
goldshards- the new amount of goldshards this player has.
-
setGrayShardsSilent
public void setGrayShardsSilent(double grayshards) Change the amount of grayshards this SDBPlayer has without communicating it through message channels. Please useSDBPlayer.setGrayShards(double)instead.- Specified by:
setGrayShardsSilentin interfaceSDBPlayer- Parameters:
grayshards- the new amount of grayshards this player has.
-
setLuckyShardsSilent
public void setLuckyShardsSilent(double luckyshards) Change the amount of luckyshards this SDBPlayer has without communicating it through message channels. Please useSDBPlayer.setLuckyShards(double)instead.- Specified by:
setLuckyShardsSilentin interfaceSDBPlayer- Parameters:
luckyshards- the new amount of luckyshards this player has.
-
setTimeSecondsSilent
public void setTimeSecondsSilent(int seconds) Change the online seconds of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setTimeHours(int)instead.- Specified by:
setTimeSecondsSilentin interfaceSDBPlayer- Parameters:
seconds- the new amount of online seconds for this SDBPlayer.
-
setTimeMinutesSilent
public void setTimeMinutesSilent(int minutes) Change the online minutes of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setTimeHours(int)instead.- Specified by:
setTimeMinutesSilentin interfaceSDBPlayer- Parameters:
minutes- the new amount of online minutes for this SDBPlayer.
-
setTimeHoursSilent
public void setTimeHoursSilent(int hours) Change the online hours of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setTimeHours(int)instead.- Specified by:
setTimeHoursSilentin interfaceSDBPlayer- Parameters:
hours- the new amount of online hours for this SDBPlayer.
-
setTimeDaysSilent
public void setTimeDaysSilent(int days) Change the online days of this SDBPlayer without communicating it through message channels. Please useSDBPlayer.setTimeDays(int)instead.- Specified by:
setTimeDaysSilentin interfaceSDBPlayer- Parameters:
days- the new amount of online days for this SDBPlayer.
-
getDeathbanTime
public long getDeathbanTime()The value ofSystem.currentTimeMillis()when the deathban of this SDBPlayer expires. Returns -1 when player is not deathbanned.- Specified by:
getDeathbanTimein interfaceSDBPlayer- Returns:
- the value of
System.currentTimeMillis()when deathban expires.
-
setDeathbanTime
public void setDeathbanTime(long deathbanmillis) Change until what value ofSystem.currentTimeMillis()the deathban of this SDBPlayer expires. Change toSystem.currentTimeMillis()to unban this player.- Specified by:
setDeathbanTimein interfaceSDBPlayer- Parameters:
deathbanmillis- new value ofSystem.currentTimeMillis()when this SDBPlayer gets unbanned.
-
setDeathbanTimeSilent
public void setDeathbanTimeSilent(long deathbanmillis) Change until what value ofSystem.currentTimeMillis()the deathban of this SDBPlayer expires without communicating it through message channels. Change toSystem.currentTimeMillis()to unban this player.- Specified by:
setDeathbanTimeSilentin interfaceSDBPlayer- Parameters:
deathbanmillis- new value ofSystem.currentTimeMillis()when this SDBPlayer gets unbanned.
-
handcuffPlayer
Handcuff a player.- Specified by:
handcuffPlayerin interfaceSDBPlayer- Parameters:
handcuffedBy- UUID of player who handcuffed this player
-
unhandcuffPlayer
public void unhandcuffPlayer()Remove the handcuffs from a player.- Specified by:
unhandcuffPlayerin interfaceSDBPlayer
-
isHandCuffed
public boolean isHandCuffed()Check if player is handcuffed.- Specified by:
isHandCuffedin interfaceSDBPlayer- Returns:
- true if player is handcuffed.
-
getHandcuffedBy
Get the possibly null UUID of the player who handcuffed this SDBPlayer.- Specified by:
getHandcuffedByin interfaceSDBPlayer- Returns:
- UUID of player who handcuffed this player
-
reset
public void reset()Reset the MinetopiaSDB playerdata of this player, this does not includes fitnessdata.
-