Package com.massivecraft.factions
Interface FPlayer
-
- All Superinterfaces:
EconomyParticipator,RelationParticipator
- All Known Implementing Classes:
JSONFPlayer,MemoryFPlayer
public interface FPlayer extends EconomyParticipator
Logged in players always have exactly one FPlayer instance. Logged out players may or may not have an FPlayer instance. They will always have one if they are part of a faction. This is because only players with a faction are saved to disk (in order to not waste disk space). The FPlayer is linked to a minecraft player using the player name. The same instance is always returned for the same player. This means you can use the == operator. No .equals method necessary.
-
-
Method Summary
Modifier and Type Method Description voidaddWarmup(WarmUpUtil.Warmup warmup, int taskId)voidalterPower(double delta)booleanattemptClaim(Faction forFaction, FLocation location, boolean notifyFailure)booleanattemptClaim(Faction forFaction, org.bukkit.Location location, boolean notifyFailure)booleancanClaimForFaction(Faction forFaction)booleancanClaimForFactionAtLocation(Faction forFaction, FLocation location, boolean notifyFailure)booleancanClaimForFactionAtLocation(Faction forFaction, org.bukkit.Location location, boolean notifyFailure)booleancanFlyAtLocation()booleancanFlyAtLocation(FLocation location)java.lang.BooleancanflyinAlly()java.lang.BooleancanflyinEnemy()java.lang.BooleancanflyinNeutral()java.lang.BooleancanflyinSafezone()java.lang.BooleancanflyinTruce()java.lang.BooleancanflyinWarzone()java.lang.BooleancanflyinWilderness()booleancheckIfNearbyEnemies()voidclearWarmup()java.lang.StringdescribeTo(RelationParticipator that)java.lang.StringdescribeTo(RelationParticipator that, boolean ucfirst)java.lang.StringgetAccountId()FactiongetAutoClaimFor()ChatModegetChatMode()java.lang.StringgetChatTag()java.lang.StringgetChatTag(Faction faction)java.lang.StringgetChatTag(FPlayer fplayer)org.bukkit.ChatColorgetColorTo(RelationParticipator rp)intgetCooldown(java.lang.String cmd)intgetDeaths()java.lang.StringgetEnteringWarp()FactiongetFaction()gets the faction of a FPlayer.java.lang.StringgetFactionId()Gets the faction ID of the player.java.lang.StringgetId()intgetKills()longgetLastFrostwalkerMessage()longgetLastLoginTime()longgetLastPowerUpdateTime()FLocationgetLastStoodAt()intgetMapHeight()longgetMillisPassed()java.lang.StringgetName()java.lang.StringgetNameAndSomething(java.lang.String something)java.lang.StringgetNameAndTag()java.lang.StringgetNameAndTitle()java.lang.StringgetNameAndTitle(Faction faction)java.lang.StringgetNameAndTitle(FPlayer fplayer)org.bukkit.entity.PlayergetPlayer()doublegetPower()doublegetPowerBoost()doublegetPowerMax()intgetPowerMaxRounded()doublegetPowerMin()intgetPowerMinRounded()intgetPowerRounded()RelationgetRelationTo(RelationParticipator rp)RelationgetRelationTo(RelationParticipator rp, boolean ignorePeaceful)RelationgetRelationToLocation()RolegetRole()java.lang.StringgetRolePrefix()java.lang.StringgetTag()java.lang.StringgetTitle()WarmUpUtil.WarmupgetWarmupType()booleanhasFaction()Check if a player has a factionbooleanhasLoginPvpDisabled()booleanhasMoney(int amt)booleanhasNotificationsEnabled()voidheal(int amnt)booleanisAdminBypassing()booleanisAlt()booleanisAutoSafeClaimEnabled()booleanisAutoWarClaimEnabled()booleanisCooldownEnded(java.lang.String cmd)booleanisEnteringPassword()booleanisFlying()booleanisIgnoreAllianceChat()booleanisInAllyTerritory()booleanisInEnemyTerritory()booleanisInNeutralTerritory()booleanisInOthersTerritory()booleanisInOwnTerritory()booleanisInspectMode()booleanisInVault()booleanisMapAutoUpdating()booleanisMonitoringJoins()booleanisOffline()booleanisOnline()booleanisOnlineAndVisibleTo(org.bukkit.entity.Player me)booleanisSpyingChat()booleanisStealthEnabled()Used to know if stealth is toggled on or offbooleanisVanished()booleanisWarmingUp()voidleave(boolean makePay)voidlogin()Sets the kills and deaths of a player.voidlogout()Caches the kills and deaths of a player.voidlosePowerFromBeingOffline()voidmsg(java.lang.String str, java.lang.Object... args)voidonDeath()voidremove()voidresetFactionData()voidresetFactionData(boolean doSpoutUpdate)voidsendFactionHereMessage(Faction from)voidsendFancyMessage(java.util.List<mkremins.fanciful.FancyMessage> message)voidsendFancyMessage(mkremins.fanciful.FancyMessage message)voidsendMessage(java.lang.String message)voidsendMessage(java.util.List<java.lang.String> messages)voidsetAlt(boolean alt)voidsetAutoClaimFor(Faction faction)voidsetAutoLeave(boolean autoLeave)voidsetChatMode(ChatMode chatMode)voidsetCooldown(java.lang.String cmd, long cooldown)voidsetEnteringPassword(boolean toggle, java.lang.String warp)voidsetFaction(Faction faction, boolean alt)Sets the faction of the FPlayervoidsetFFlying(boolean fly, boolean damage)voidsetFlying(boolean fly)voidsetId(java.lang.String id)voidsetIgnoreAllianceChat(boolean ignore)voidsetInspectMode(boolean status)voidsetInVault(boolean status)voidsetIsAdminBypassing(boolean val)voidsetIsAutoSafeClaimEnabled(boolean enabled)voidsetIsAutoWarClaimEnabled(boolean enabled)voidsetLastFrostwalkerMessage()voidsetLastLoginTime(long lastLoginTime)voidsetLastStoodAt(FLocation flocation)voidsetMapAutoUpdating(boolean mapAutoUpdating)voidsetMapHeight(int height)voidsetMonitorJoins(boolean monitor)voidsetNotificationsEnabled(boolean notifications)voidsetPowerBoost(double powerBoost)voidsetRole(Role role)voidsetShowScoreboard(boolean show)voidsetSpyingChat(boolean chatSpying)voidsetStealth(boolean stealthToggle)Toggles the stealth of the FPlayer depending on the parametervoidsetTakeFallDamage(boolean fallDamage)voidsetTitle(org.bukkit.command.CommandSender sender, java.lang.String title)booleanshouldTakeFallDamage()booleanshowScoreboard()voidstopWarmup()voidtakeMoney(int amt)voidupdatePower()booleanwillAutoLeave()Gets autoleave status-
Methods inherited from interface com.massivecraft.factions.iface.EconomyParticipator
msg
-
-
-
-
Method Detail
-
setNotificationsEnabled
void setNotificationsEnabled(boolean notifications)
-
hasNotificationsEnabled
boolean hasNotificationsEnabled()
-
isAlt
boolean isAlt()
-
setAlt
void setAlt(boolean alt)
-
isStealthEnabled
boolean isStealthEnabled()
Used to know if stealth is toggled on or off- Returns:
- if stealth mode is on or not.
-
setStealth
void setStealth(boolean stealthToggle)
Toggles the stealth of the FPlayer depending on the parameter- Parameters:
stealthToggle- - toggles stealth
-
login
void login()
Sets the kills and deaths of a player.
-
logout
void logout()
Caches the kills and deaths of a player.
-
getFaction
Faction getFaction()
gets the faction of a FPlayer.- Returns:
- Faction of the FPlayer.
-
setFaction
void setFaction(Faction faction, boolean alt)
Sets the faction of the FPlayer- Parameters:
faction- faction to set.
-
getFactionId
java.lang.String getFactionId()
Gets the faction ID of the player.- Returns:
- FactionsID string
-
hasFaction
boolean hasFaction()
Check if a player has a faction- Returns:
- boolean
-
willAutoLeave
boolean willAutoLeave()
Gets autoleave status- Returns:
- boolean of the autoleave
-
setAutoLeave
void setAutoLeave(boolean autoLeave)
-
getLastFrostwalkerMessage
long getLastFrostwalkerMessage()
-
setLastFrostwalkerMessage
void setLastFrostwalkerMessage()
-
setMonitorJoins
void setMonitorJoins(boolean monitor)
-
isMonitoringJoins
boolean isMonitoringJoins()
-
getRole
Role getRole()
-
setRole
void setRole(Role role)
-
shouldTakeFallDamage
boolean shouldTakeFallDamage()
-
setTakeFallDamage
void setTakeFallDamage(boolean fallDamage)
-
getPowerBoost
double getPowerBoost()
-
setPowerBoost
void setPowerBoost(double powerBoost)
-
getAutoClaimFor
Faction getAutoClaimFor()
-
setAutoClaimFor
void setAutoClaimFor(Faction faction)
-
isAutoSafeClaimEnabled
boolean isAutoSafeClaimEnabled()
-
setIsAutoSafeClaimEnabled
void setIsAutoSafeClaimEnabled(boolean enabled)
-
isAutoWarClaimEnabled
boolean isAutoWarClaimEnabled()
-
setIsAutoWarClaimEnabled
void setIsAutoWarClaimEnabled(boolean enabled)
-
isAdminBypassing
boolean isAdminBypassing()
-
isVanished
boolean isVanished()
-
setIsAdminBypassing
void setIsAdminBypassing(boolean val)
-
getChatMode
ChatMode getChatMode()
-
setChatMode
void setChatMode(ChatMode chatMode)
-
isIgnoreAllianceChat
boolean isIgnoreAllianceChat()
-
setIgnoreAllianceChat
void setIgnoreAllianceChat(boolean ignore)
-
isSpyingChat
boolean isSpyingChat()
-
setSpyingChat
void setSpyingChat(boolean chatSpying)
-
showScoreboard
boolean showScoreboard()
-
setShowScoreboard
void setShowScoreboard(boolean show)
-
getAccountId
java.lang.String getAccountId()
- Specified by:
getAccountIdin interfaceEconomyParticipator
-
resetFactionData
void resetFactionData(boolean doSpoutUpdate)
-
resetFactionData
void resetFactionData()
-
getLastLoginTime
long getLastLoginTime()
-
setLastLoginTime
void setLastLoginTime(long lastLoginTime)
-
isMapAutoUpdating
boolean isMapAutoUpdating()
-
setMapAutoUpdating
void setMapAutoUpdating(boolean mapAutoUpdating)
-
hasLoginPvpDisabled
boolean hasLoginPvpDisabled()
-
getLastStoodAt
FLocation getLastStoodAt()
-
setLastStoodAt
void setLastStoodAt(FLocation flocation)
-
getTitle
java.lang.String getTitle()
-
setTitle
void setTitle(org.bukkit.command.CommandSender sender, java.lang.String title)
-
getName
java.lang.String getName()
-
getTag
java.lang.String getTag()
-
getNameAndSomething
java.lang.String getNameAndSomething(java.lang.String something)
-
getNameAndTitle
java.lang.String getNameAndTitle()
-
getNameAndTag
java.lang.String getNameAndTag()
-
getNameAndTitle
java.lang.String getNameAndTitle(Faction faction)
-
getNameAndTitle
java.lang.String getNameAndTitle(FPlayer fplayer)
-
getChatTag
java.lang.String getChatTag()
-
getChatTag
java.lang.String getChatTag(Faction faction)
-
getChatTag
java.lang.String getChatTag(FPlayer fplayer)
-
getKills
int getKills()
-
getDeaths
int getDeaths()
-
takeMoney
void takeMoney(int amt)
-
hasMoney
boolean hasMoney(int amt)
-
isInspectMode
boolean isInspectMode()
-
setInspectMode
void setInspectMode(boolean status)
-
canflyinWilderness
java.lang.Boolean canflyinWilderness()
-
canflyinWarzone
java.lang.Boolean canflyinWarzone()
-
canflyinSafezone
java.lang.Boolean canflyinSafezone()
-
canflyinEnemy
java.lang.Boolean canflyinEnemy()
-
canflyinAlly
java.lang.Boolean canflyinAlly()
-
canflyinTruce
java.lang.Boolean canflyinTruce()
-
canflyinNeutral
java.lang.Boolean canflyinNeutral()
-
describeTo
java.lang.String describeTo(RelationParticipator that, boolean ucfirst)
- Specified by:
describeToin interfaceRelationParticipator
-
describeTo
java.lang.String describeTo(RelationParticipator that)
- Specified by:
describeToin interfaceRelationParticipator
-
getRelationTo
Relation getRelationTo(RelationParticipator rp)
- Specified by:
getRelationToin interfaceRelationParticipator
-
getRelationTo
Relation getRelationTo(RelationParticipator rp, boolean ignorePeaceful)
- Specified by:
getRelationToin interfaceRelationParticipator
-
getRelationToLocation
Relation getRelationToLocation()
-
getColorTo
org.bukkit.ChatColor getColorTo(RelationParticipator rp)
- Specified by:
getColorToin interfaceRelationParticipator
-
getRolePrefix
java.lang.String getRolePrefix()
-
heal
void heal(int amnt)
-
getPower
double getPower()
-
alterPower
void alterPower(double delta)
-
getPowerMax
double getPowerMax()
-
getPowerMin
double getPowerMin()
-
getPowerRounded
int getPowerRounded()
-
getPowerMaxRounded
int getPowerMaxRounded()
-
getPowerMinRounded
int getPowerMinRounded()
-
getMillisPassed
long getMillisPassed()
-
getLastPowerUpdateTime
long getLastPowerUpdateTime()
-
updatePower
void updatePower()
-
losePowerFromBeingOffline
void losePowerFromBeingOffline()
-
onDeath
void onDeath()
-
isInOwnTerritory
boolean isInOwnTerritory()
-
isInOthersTerritory
boolean isInOthersTerritory()
-
isInAllyTerritory
boolean isInAllyTerritory()
-
isInNeutralTerritory
boolean isInNeutralTerritory()
-
isInEnemyTerritory
boolean isInEnemyTerritory()
-
sendFactionHereMessage
void sendFactionHereMessage(Faction from)
-
leave
void leave(boolean makePay)
-
canClaimForFaction
boolean canClaimForFaction(Faction forFaction)
-
canClaimForFactionAtLocation
boolean canClaimForFactionAtLocation(Faction forFaction, org.bukkit.Location location, boolean notifyFailure)
-
canClaimForFactionAtLocation
boolean canClaimForFactionAtLocation(Faction forFaction, FLocation location, boolean notifyFailure)
-
attemptClaim
boolean attemptClaim(Faction forFaction, org.bukkit.Location location, boolean notifyFailure)
-
isInVault
boolean isInVault()
-
setInVault
void setInVault(boolean status)
-
msg
void msg(java.lang.String str, java.lang.Object... args)- Specified by:
msgin interfaceEconomyParticipator
-
getId
java.lang.String getId()
-
setId
void setId(java.lang.String id)
-
getPlayer
org.bukkit.entity.Player getPlayer()
-
isOnline
boolean isOnline()
-
sendMessage
void sendMessage(java.lang.String message)
-
sendMessage
void sendMessage(java.util.List<java.lang.String> messages)
-
sendFancyMessage
void sendFancyMessage(mkremins.fanciful.FancyMessage message)
-
sendFancyMessage
void sendFancyMessage(java.util.List<mkremins.fanciful.FancyMessage> message)
-
getMapHeight
int getMapHeight()
-
setMapHeight
void setMapHeight(int height)
-
isOnlineAndVisibleTo
boolean isOnlineAndVisibleTo(org.bukkit.entity.Player me)
-
remove
void remove()
-
isOffline
boolean isOffline()
-
isFlying
boolean isFlying()
-
setFlying
void setFlying(boolean fly)
-
setFFlying
void setFFlying(boolean fly, boolean damage)
-
canFlyAtLocation
boolean canFlyAtLocation()
-
canFlyAtLocation
boolean canFlyAtLocation(FLocation location)
-
isEnteringPassword
boolean isEnteringPassword()
-
setEnteringPassword
void setEnteringPassword(boolean toggle, java.lang.String warp)
-
getEnteringWarp
java.lang.String getEnteringWarp()
-
checkIfNearbyEnemies
boolean checkIfNearbyEnemies()
-
getCooldown
int getCooldown(java.lang.String cmd)
-
setCooldown
void setCooldown(java.lang.String cmd, long cooldown)
-
isCooldownEnded
boolean isCooldownEnded(java.lang.String cmd)
-
isWarmingUp
boolean isWarmingUp()
-
getWarmupType
WarmUpUtil.Warmup getWarmupType()
-
addWarmup
void addWarmup(WarmUpUtil.Warmup warmup, int taskId)
-
stopWarmup
void stopWarmup()
-
clearWarmup
void clearWarmup()
-
-