Package dev.kitteh.factions.data
Class MemoryFaction
java.lang.Object
dev.kitteh.factions.data.MemoryFaction
- All Implemented Interfaces:
Faction,Participator,Selectable
- Direct Known Subclasses:
JSONFaction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Roleprotected Stringprotected doubleprotected longprotected longprotected @Nullable LazyLocationprotected intprotected longprotected longprotected longprotected @Nullable Stringprotected intprotected @Nullable org.bukkit.OfflinePlayerprotected booleanprotected booleanprotected booleanprotected booleanprotected @Nullable Integerprotected @Nullable LinkedHashMap<PermSelector, Map<String, Boolean>> protected MemoryFaction.Permissionsprotected doubleprotected ConcurrentHashMap<Integer, Relation> protected longprotected longprotected Stringprotected intprotected it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<String> protected ConcurrentHashMap<String, String> protected ConcurrentHashMap<String, LazyLocation> protected MemoryFaction.Zones -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnouncement(FPlayer fPlayer, String msg) void@Nullable FPlayeradmin()org.bukkit.OfflinePlayerGets an OfflinePlayer for the given participator.voidbans()voidvoidvoidvoidcreateWarp(String name, LazyLocation loc) intdeaths()voiddefaultRole(Role role) voidvoiddescription(String value) doubledtr()voiddtr(double dtr) booleanlongvoiddtrFrozenUntil(long time) longdoublefounded()voidbooleanhasAccess(Selectable selectable, PermissibleAction permissibleAction, @Nullable FLocation location) Get the access of a selectable for a given chunk.booleanbooleanbooleanhasWarpPassword(String warp) @Nullable org.bukkit.Locationhome()voidhome(org.bukkit.Location home) intid()voidinvites()booleanbooleanbooleanbooleanbooleanbooleanisWarpPassword(String warp, String password) intkills()voidlink()voidintvoidmaxVaults(int value) members()membersOnline(boolean online) membersOnline(boolean online, @Nullable FPlayer viewer) ArrayList<org.bukkit.entity.Player> voidSends a String.format-able message.booleanopen()voidopen(boolean isOpen) voidpeaceful(boolean isPeaceful) booleanvoidpeacefulExplosionsEnabled(boolean val) voidpermanent(boolean isPermanent) @Nullable IntegervoidpermanentPower(@Nullable Integer permanentPower) doublevoidpowerBoost(double powerBoost) doubleGets the exact faction power, which is not used for claim/raidability calculationsdoubleGets the exact faction max powervoidrelationWish(Faction otherFaction) voidrelationWish(Faction otherFaction, Relation relation) voidremove()voidvoidremoveMember(FPlayer fPlayer) booleanremoveWarp(String name) voidremoveWarpPassword(String warp) voidvoidsendUnreadAnnouncements(FPlayer fPlayer) voidsetId(int id) voidsetWarpPassword(String warp, String password) voidintsize()tag()voidtagLegacy(@Nullable Participator other) inttntBank()voidtntBank(int amount) intvoidvoidintupgradeLevel(Upgrade upgrade) voidupgradeLevel(Upgrade upgrade, int level) warps()zones()Gets the faction's zone controller.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.kitteh.factions.Faction
claimCount, claimCount, claims, hasHome, hasLandInflation, hasPermanentPower, isNormal, isRaidable, isSafeZone, isWarZone, isWilderness, maxWarps, memberLimit, noExplosionsInTerritory, noMonstersInTerritory, noPvPInTerritory, power, powerMax, relationCount, sendMessage, sendMessageLegacy, shieldActiveMethods inherited from interface dev.kitteh.factions.Participator
colorLegacyStringTo, describeToLegacy, describeToLegacy, msgLegacy, relationTo, relationTo, sendRichMessage, textColorTo
-
Field Details
-
id
protected int id -
peacefulExplosionsEnabled
protected boolean peacefulExplosionsEnabled -
permanent
protected boolean permanent -
tag
-
description
-
link
-
open
protected boolean open -
peaceful
protected boolean peaceful -
permanentPower
-
home
-
foundedDate
protected long foundedDate -
powerBoost
protected double powerBoost -
relationWish
-
invites
-
announcements
-
warps
-
warpPasswords
-
lastDeath
protected long lastDeath -
maxVaults
protected int maxVaults -
defaultRole
-
permissions
-
bans
-
dtr
protected double dtr -
lastDTRUpdateTime
protected long lastDTRUpdateTime -
frozenDTRUntilTime
protected long frozenDTRUntilTime -
tntBank
protected int tntBank -
shieldEnd
protected long shieldEnd -
shieldCooldownEnd
protected long shieldCooldownEnd -
upgrades
-
perms
-
zones
-
lastPlayerLoggedOffTime
protected transient long lastPlayerLoggedOffTime -
fplayers
-
offlinePlayer
protected transient @Nullable org.bukkit.OfflinePlayer offlinePlayer
-
-
Constructor Details
-
MemoryFaction
-
-
Method Details
-
cleanupDeserialization
public void cleanupDeserialization() -
addAnnouncement
- Specified by:
addAnnouncementin interfaceFaction
-
sendUnreadAnnouncements
- Specified by:
sendUnreadAnnouncementsin interfaceFaction
-
warps
-
warp
-
createWarp
- Specified by:
createWarpin interfaceFaction
-
isWarp
-
removeWarp
- Specified by:
removeWarpin interfaceFaction
-
isWarpPassword
- Specified by:
isWarpPasswordin interfaceFaction
-
hasWarpPassword
- Specified by:
hasWarpPasswordin interfaceFaction
-
setWarpPassword
- Specified by:
setWarpPasswordin interfaceFaction
-
removeWarpPassword
- Specified by:
removeWarpPasswordin interfaceFaction
-
clearWarps
public void clearWarps()- Specified by:
clearWarpsin interfaceFaction
-
maxVaults
public int maxVaults() -
maxVaults
public void maxVaults(int value) -
invites
-
id
public int id() -
setId
public void setId(int id) -
invite
-
deInvite
-
hasInvite
-
ban
-
unban
-
isBanned
-
bans
-
open
public boolean open() -
open
public void open(boolean isOpen) -
isPeaceful
public boolean isPeaceful()- Specified by:
isPeacefulin interfaceFaction
-
peaceful
public void peaceful(boolean isPeaceful) -
peacefulExplosionsEnabled
public void peacefulExplosionsEnabled(boolean val) - Specified by:
peacefulExplosionsEnabledin interfaceFaction
-
peacefulExplosionsEnabled
public boolean peacefulExplosionsEnabled()- Specified by:
peacefulExplosionsEnabledin interfaceFaction
-
isPermanent
public boolean isPermanent()- Specified by:
isPermanentin interfaceFaction
-
permanent
public void permanent(boolean isPermanent) -
tag
-
tagLegacy
-
tag
-
description
- Specified by:
descriptionin interfaceFaction
-
description
- Specified by:
descriptionin interfaceFaction
-
link
-
link
-
home
public void home(org.bukkit.Location home) -
removeHome
public void removeHome()- Specified by:
removeHomein interfaceFaction
-
home
public @Nullable org.bukkit.Location home() -
confirmValidHome
public void confirmValidHome() -
founded
-
founded
-
asOfflinePlayer
public org.bukkit.OfflinePlayer asOfflinePlayer()Description copied from interface:ParticipatorGets an OfflinePlayer for the given participator.- Specified by:
asOfflinePlayerin interfaceParticipator- Returns:
- offline player representation
-
lastDeath
-
lastDeath
-
kills
public int kills() -
deaths
public int deaths() -
hasAccess
public boolean hasAccess(Selectable selectable, PermissibleAction permissibleAction, @Nullable FLocation location) Description copied from interface:FactionGet the access of a selectable for a given chunk. -
permissions
- Specified by:
permissionsin interfaceFaction
-
resetPerms
public void resetPerms() -
defaultRole
- Specified by:
defaultRolein interfaceFaction
-
defaultRole
- Specified by:
defaultRolein interfaceFaction
-
relationWish
- Specified by:
relationWishin interfaceFaction
-
relationWish
- Specified by:
relationWishin interfaceFaction
-
dtr
public double dtr() -
dtrWithoutUpdate
public double dtrWithoutUpdate()- Specified by:
dtrWithoutUpdatein interfaceFaction
-
dtr
public void dtr(double dtr) -
dtrLastUpdated
public long dtrLastUpdated()- Specified by:
dtrLastUpdatedin interfaceFaction
-
dtrFrozenUntil
public long dtrFrozenUntil()- Specified by:
dtrFrozenUntilin interfaceFaction
-
dtrFrozenUntil
public void dtrFrozenUntil(long time) - Specified by:
dtrFrozenUntilin interfaceFaction
-
dtrFrozen
public boolean dtrFrozen() -
powerExact
public double powerExact()Description copied from interface:FactionGets the exact faction power, which is not used for claim/raidability calculations- Specified by:
powerExactin interfaceFaction- Returns:
- exact power
-
powerMaxExact
public double powerMaxExact()Description copied from interface:FactionGets the exact faction max power- Specified by:
powerMaxExactin interfaceFaction- Returns:
- exactmax power
-
permanentPower
- Specified by:
permanentPowerin interfaceFaction
-
permanentPower
- Specified by:
permanentPowerin interfaceFaction
-
powerBoost
public double powerBoost()- Specified by:
powerBoostin interfaceFaction
-
powerBoost
public void powerBoost(double powerBoost) - Specified by:
powerBoostin interfaceFaction
-
isPowerFrozen
public boolean isPowerFrozen()- Specified by:
isPowerFrozenin interfaceFaction
-
tntBank
public int tntBank() -
tntBankMax
public int tntBankMax()- Specified by:
tntBankMaxin interfaceFaction
-
tntBank
public void tntBank(int amount) -
shieldCooldownRemaining
- Specified by:
shieldCooldownRemainingin interfaceFaction
-
shieldRemaining
- Specified by:
shieldRemainingin interfaceFaction
-
shield
-
upgradeLevel
- Specified by:
upgradeLevelin interfaceFaction
-
upgradeLevel
- Specified by:
upgradeLevelin interfaceFaction
-
addMember
-
removeMember
-
size
public int size() -
members
-
membersOnline
- Specified by:
membersOnlinein interfaceFaction
-
membersOnline
- Specified by:
membersOnlinein interfaceFaction
-
admin
-
members
-
membersOnlineAsPlayers
- Specified by:
membersOnlineAsPlayersin interfaceFaction
-
hasMembersOnline
public boolean hasMembersOnline()- Specified by:
hasMembersOnlinein interfaceFaction
-
trackMemberLoggedOff
public void trackMemberLoggedOff()- Specified by:
trackMemberLoggedOffin interfaceFaction
-
promoteNewLeader
public void promoteNewLeader()- Specified by:
promoteNewLeaderin interfaceFaction
-
msgLegacy
Description copied from interface:ParticipatorSends a String.format-able message.- Specified by:
msgLegacyin interfaceParticipator- Parameters:
message- stringargs- args
-
remove
public void remove() -
zones
Description copied from interface:FactionGets the faction's zone controller.
-