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 void
addWarmup(WarmUpUtil.Warmup warmup, int taskId)
void
alterPower(double delta)
boolean
attemptClaim(Faction forFaction, FLocation location, boolean notifyFailure)
boolean
attemptClaim(Faction forFaction, org.bukkit.Location location, boolean notifyFailure)
boolean
canClaimForFaction(Faction forFaction)
boolean
canClaimForFactionAtLocation(Faction forFaction, FLocation location, boolean notifyFailure)
boolean
canClaimForFactionAtLocation(Faction forFaction, org.bukkit.Location location, boolean notifyFailure)
boolean
canFlyAtLocation()
boolean
canFlyAtLocation(FLocation location)
java.lang.Boolean
canflyinAlly()
java.lang.Boolean
canflyinEnemy()
java.lang.Boolean
canflyinNeutral()
java.lang.Boolean
canflyinSafezone()
java.lang.Boolean
canflyinTruce()
java.lang.Boolean
canflyinWarzone()
java.lang.Boolean
canflyinWilderness()
boolean
checkIfNearbyEnemies()
void
clearWarmup()
java.lang.String
describeTo(RelationParticipator that)
java.lang.String
describeTo(RelationParticipator that, boolean ucfirst)
java.lang.String
getAccountId()
Faction
getAutoClaimFor()
ChatMode
getChatMode()
java.lang.String
getChatTag()
java.lang.String
getChatTag(Faction faction)
java.lang.String
getChatTag(FPlayer fplayer)
org.bukkit.ChatColor
getColorTo(RelationParticipator rp)
int
getCooldown(java.lang.String cmd)
int
getDeaths()
java.lang.String
getEnteringWarp()
Faction
getFaction()
gets the faction of a FPlayer.java.lang.String
getFactionId()
Gets the faction ID of the player.java.lang.String
getId()
int
getKills()
long
getLastFrostwalkerMessage()
long
getLastLoginTime()
long
getLastPowerUpdateTime()
FLocation
getLastStoodAt()
int
getMapHeight()
long
getMillisPassed()
java.lang.String
getName()
java.lang.String
getNameAndSomething(java.lang.String something)
java.lang.String
getNameAndTag()
java.lang.String
getNameAndTitle()
java.lang.String
getNameAndTitle(Faction faction)
java.lang.String
getNameAndTitle(FPlayer fplayer)
org.bukkit.entity.Player
getPlayer()
double
getPower()
double
getPowerBoost()
double
getPowerMax()
int
getPowerMaxRounded()
double
getPowerMin()
int
getPowerMinRounded()
int
getPowerRounded()
Relation
getRelationTo(RelationParticipator rp)
Relation
getRelationTo(RelationParticipator rp, boolean ignorePeaceful)
Relation
getRelationToLocation()
Role
getRole()
java.lang.String
getRolePrefix()
java.lang.String
getTag()
java.lang.String
getTitle()
WarmUpUtil.Warmup
getWarmupType()
boolean
hasFaction()
Check if a player has a factionboolean
hasLoginPvpDisabled()
boolean
hasMoney(int amt)
boolean
hasNotificationsEnabled()
void
heal(int amnt)
boolean
isAdminBypassing()
boolean
isAlt()
boolean
isAutoSafeClaimEnabled()
boolean
isAutoWarClaimEnabled()
boolean
isCooldownEnded(java.lang.String cmd)
boolean
isEnteringPassword()
boolean
isFlying()
boolean
isIgnoreAllianceChat()
boolean
isInAllyTerritory()
boolean
isInEnemyTerritory()
boolean
isInNeutralTerritory()
boolean
isInOthersTerritory()
boolean
isInOwnTerritory()
boolean
isInspectMode()
boolean
isInVault()
boolean
isMapAutoUpdating()
boolean
isMonitoringJoins()
boolean
isOffline()
boolean
isOnline()
boolean
isOnlineAndVisibleTo(org.bukkit.entity.Player me)
boolean
isSpyingChat()
boolean
isStealthEnabled()
Used to know if stealth is toggled on or offboolean
isVanished()
boolean
isWarmingUp()
void
leave(boolean makePay)
void
login()
Sets the kills and deaths of a player.void
logout()
Caches the kills and deaths of a player.void
losePowerFromBeingOffline()
void
msg(java.lang.String str, java.lang.Object... args)
void
onDeath()
void
remove()
void
resetFactionData()
void
resetFactionData(boolean doSpoutUpdate)
void
sendFactionHereMessage(Faction from)
void
sendFancyMessage(java.util.List<mkremins.fanciful.FancyMessage> message)
void
sendFancyMessage(mkremins.fanciful.FancyMessage message)
void
sendMessage(java.lang.String message)
void
sendMessage(java.util.List<java.lang.String> messages)
void
setAlt(boolean alt)
void
setAutoClaimFor(Faction faction)
void
setAutoLeave(boolean autoLeave)
void
setChatMode(ChatMode chatMode)
void
setCooldown(java.lang.String cmd, long cooldown)
void
setEnteringPassword(boolean toggle, java.lang.String warp)
void
setFaction(Faction faction, boolean alt)
Sets the faction of the FPlayervoid
setFFlying(boolean fly, boolean damage)
void
setFlying(boolean fly)
void
setId(java.lang.String id)
void
setIgnoreAllianceChat(boolean ignore)
void
setInspectMode(boolean status)
void
setInVault(boolean status)
void
setIsAdminBypassing(boolean val)
void
setIsAutoSafeClaimEnabled(boolean enabled)
void
setIsAutoWarClaimEnabled(boolean enabled)
void
setLastFrostwalkerMessage()
void
setLastLoginTime(long lastLoginTime)
void
setLastStoodAt(FLocation flocation)
void
setMapAutoUpdating(boolean mapAutoUpdating)
void
setMapHeight(int height)
void
setMonitorJoins(boolean monitor)
void
setNotificationsEnabled(boolean notifications)
void
setPowerBoost(double powerBoost)
void
setRole(Role role)
void
setShowScoreboard(boolean show)
void
setSpyingChat(boolean chatSpying)
void
setStealth(boolean stealthToggle)
Toggles the stealth of the FPlayer depending on the parametervoid
setTakeFallDamage(boolean fallDamage)
void
setTitle(org.bukkit.command.CommandSender sender, java.lang.String title)
boolean
shouldTakeFallDamage()
boolean
showScoreboard()
void
stopWarmup()
void
takeMoney(int amt)
void
updatePower()
boolean
willAutoLeave()
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:
getAccountId
in 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:
describeTo
in interfaceRelationParticipator
-
describeTo
java.lang.String describeTo(RelationParticipator that)
- Specified by:
describeTo
in interfaceRelationParticipator
-
getRelationTo
Relation getRelationTo(RelationParticipator rp)
- Specified by:
getRelationTo
in interfaceRelationParticipator
-
getRelationTo
Relation getRelationTo(RelationParticipator rp, boolean ignorePeaceful)
- Specified by:
getRelationTo
in interfaceRelationParticipator
-
getRelationToLocation
Relation getRelationToLocation()
-
getColorTo
org.bukkit.ChatColor getColorTo(RelationParticipator rp)
- Specified by:
getColorTo
in 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:
msg
in 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()
-
-