Class IslandInfo
java.lang.Object
us.talabrek.ultimateskyblock.island.IslandInfo
- All Implemented Interfaces:
us.talabrek.ultimateskyblock.api.IslandInfo
Data object for an island
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMember
(@NotNull PlayerInfo playerInfo) void
Deprecated.boolean
banPlayer
(@NotNull org.bukkit.OfflinePlayer target) boolean
banPlayer
(@NotNull org.bukkit.OfflinePlayer target, @Nullable org.bukkit.OfflinePlayer initializer) boolean
contains
(org.bukkit.Location loc) void
delete()
boolean
exists()
getBans()
getBiome()
int
org.bukkit.Location
int
double
getLevel()
getLog()
int
int
int
int
int
getName()
List<org.bukkit.entity.Player>
int
double
double
Deprecated.@Nullable org.bukkit.Location
boolean
boolean
boolean
boolean
hasWarp()
boolean
ignore()
boolean
isBanned
(@NotNull org.bukkit.OfflinePlayer target) boolean
boolean
boolean
isBanned
(org.bukkit.entity.Player player) boolean
isDirty()
boolean
isLeader
(@NotNull org.bukkit.OfflinePlayer target) boolean
boolean
isLeader
(org.bukkit.entity.Player player) boolean
isLocked()
boolean
isMember
(@NotNull org.bukkit.OfflinePlayer target) boolean
isParty()
boolean
isTrusted
(@NotNull org.bukkit.OfflinePlayer target) boolean
lock
(@NotNull org.bukkit.entity.Player player) Locks the island.void
void
removeMember
(@NotNull PlayerInfo member) void
resetIslandConfig
(@NotNull String leader) void
save()
void
void
sendMessageToIslandGroup
(boolean broadcast, @NotNull String message, @Nullable Object... args) void
void
void
setConfig
(org.bukkit.configuration.file.FileConfiguration config) If you need to inject a customFileConfiguration
for e.g.static void
setDirectory
(@NotNull File dir) void
If you need to inject a customFile
for e.g.void
setHopperCount
(int i) void
setIgnore
(boolean b) void
setLeafBreaks
(int breaks) void
setLevel
(double score) void
setRegionVersion
(String version) void
setSchematicName
(String schematicName) void
void
void
setupPartyLeader
(@NotNull String leader) void
setupPartyMember
(@NotNull PlayerInfo member) void
setWarp
(boolean active) void
setWarpLocation
(@Nullable org.bukkit.Location loc) boolean
togglePerm
(@NotNull String playername, @NotNull String perm) toString()
boolean
trustPlayer
(@NotNull org.bukkit.OfflinePlayer target) boolean
trustPlayer
(@NotNull org.bukkit.OfflinePlayer target, @Nullable org.bukkit.OfflinePlayer initializer) boolean
unbanPlayer
(@NotNull org.bukkit.OfflinePlayer target) boolean
unbanPlayer
(@NotNull org.bukkit.OfflinePlayer target, @Nullable org.bukkit.OfflinePlayer initializer) boolean
unlock
(@NotNull org.bukkit.entity.Player player) Unlocks the island.boolean
untrustPlayer
(@NotNull org.bukkit.OfflinePlayer target) boolean
untrustPlayer
(@NotNull org.bukkit.OfflinePlayer target, @Nullable org.bukkit.OfflinePlayer initializer) void
updatePermissionPerks
(@NotNull org.bukkit.entity.Player member, @NotNull Perk perk)
-
Constructor Details
-
IslandInfo
-
-
Method Details
-
exists
public boolean exists() -
setDirectory
-
resetIslandConfig
-
setupPartyLeader
-
addMember
-
setupPartyMember
-
updatePermissionPerks
public void updatePermissionPerks(@NotNull @NotNull org.bukkit.entity.Player member, @NotNull @NotNull Perk perk) -
save
public void save() -
isDirty
public boolean isDirty() -
saveToFile
public void saveToFile() -
getMaxPartySize
public int getMaxPartySize()- Specified by:
getMaxPartySize
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getMaxAnimals
public int getMaxAnimals()- Specified by:
getMaxAnimals
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getMaxMonsters
public int getMaxMonsters()- Specified by:
getMaxMonsters
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getMaxVillagers
public int getMaxVillagers()- Specified by:
getMaxVillagers
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getMaxGolems
public int getMaxGolems()- Specified by:
getMaxGolems
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getBlockLimits
- Specified by:
getBlockLimits
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getLeader
- Specified by:
getLeader
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getLeaderUniqueId
-
hasPerm
-
hasPerm
-
getBiome
- Specified by:
getBiome
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
setBiome
-
setWarpLocation
public void setWarpLocation(@Nullable @Nullable org.bukkit.Location loc) -
togglePerm
-
getMembers
- Specified by:
getMembers
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getMemberUUIDs
-
isMember
public boolean isMember(@NotNull @NotNull org.bukkit.OfflinePlayer target) -
log
-
getPartySize
public int getPartySize()- Specified by:
getPartySize
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
isLeader
public boolean isLeader(@NotNull @NotNull org.bukkit.OfflinePlayer target) -
isLeader
public boolean isLeader(org.bukkit.entity.Player player) - Specified by:
isLeader
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
isLeader
-
hasWarp
public boolean hasWarp() -
isLocked
public boolean isLocked() -
getName
- Specified by:
getName
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
setWarp
public void setWarp(boolean active) -
lock
public boolean lock(@NotNull @NotNull org.bukkit.entity.Player player) Locks the island. Might get cancelled via the firedIslandLockEvent
.- Parameters:
player
-Player
initializing the lock.- Returns:
- True if the island was locked, false otherwise, e.g. when the event is cancelled.
-
unlock
public boolean unlock(@NotNull @NotNull org.bukkit.entity.Player player) Unlocks the island. Might get cancelled via the firedIslandUnlockEvent
.- Parameters:
player
-Player
initializing the unlock.- Returns:
- True if the island was unlocked, false otherwise, e.g. when the event is cancelled.
-
sendMessageToIslandGroup
-
isBanned
public boolean isBanned(@NotNull @NotNull org.bukkit.OfflinePlayer target) - Specified by:
isBanned
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
isBanned
public boolean isBanned(org.bukkit.entity.Player player) - Specified by:
isBanned
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
isBanned
-
isBanned
-
banPlayer
public boolean banPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target) - Specified by:
banPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
banPlayer
public boolean banPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target, @Nullable @Nullable org.bukkit.OfflinePlayer initializer) - Specified by:
banPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
unbanPlayer
public boolean unbanPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target) - Specified by:
unbanPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
unbanPlayer
public boolean unbanPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target, @Nullable @Nullable org.bukkit.OfflinePlayer initializer) - Specified by:
unbanPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
banPlayer
Deprecated. -
getBans
- Specified by:
getBans
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getTrustees
Deprecated.- Specified by:
getTrustees
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getTrusteeUUIDs
-
trustPlayer
public boolean trustPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target) - Specified by:
trustPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
trustPlayer
public boolean trustPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target, @Nullable @Nullable org.bukkit.OfflinePlayer initializer) - Specified by:
trustPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
untrustPlayer
public boolean untrustPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target) - Specified by:
untrustPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
untrustPlayer
public boolean untrustPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer target, @Nullable @Nullable org.bukkit.OfflinePlayer initializer) - Specified by:
untrustPlayer
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
isTrusted
public boolean isTrusted(@NotNull @NotNull org.bukkit.OfflinePlayer target) - Specified by:
isTrusted
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
removeMember
-
setLevel
public void setLevel(double score) -
getLevel
public double getLevel()- Specified by:
getLevel
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
setRegionVersion
-
getRegionVersion
-
getLog
- Specified by:
getLog
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
isParty
public boolean isParty()- Specified by:
isParty
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getWarpLocation
@Nullable public @Nullable org.bukkit.Location getWarpLocation()- Specified by:
getWarpLocation
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getIslandLocation
public org.bukkit.Location getIslandLocation()- Specified by:
getIslandLocation
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
toString
-
hasOnlineMembers
public boolean hasOnlineMembers()- Specified by:
hasOnlineMembers
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
getOnlineMembers
- Specified by:
getOnlineMembers
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
contains
public boolean contains(org.bukkit.Location loc) - Specified by:
contains
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
sendMessageToOnlineMembers
-
delete
public void delete() -
ignore
public boolean ignore() -
setIgnore
public void setIgnore(boolean b) -
getLeafBreaks
public int getLeafBreaks() -
setLeafBreaks
public void setLeafBreaks(int breaks) -
getSchematicName
- Specified by:
getSchematicName
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
setSchematicName
-
getScoreMultiplier
public double getScoreMultiplier()- Specified by:
getScoreMultiplier
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
setScoreMultiplier
-
getScoreOffset
public double getScoreOffset()- Specified by:
getScoreOffset
in interfaceus.talabrek.ultimateskyblock.api.IslandInfo
-
setScoreOffset
-
getHopperCount
public int getHopperCount() -
setHopperCount
public void setHopperCount(int i) -
setFile
If you need to inject a customFile
for e.g. unit tests, do it here.- Parameters:
file
- Custom File
-
setConfig
public void setConfig(org.bukkit.configuration.file.FileConfiguration config) If you need to inject a customFileConfiguration
for e.g. unit tests, do it here.- Parameters:
config
- Custom FileConfiguration
-