Package org.kingdoms.constants.land
Class Land
java.lang.Object
org.kingdoms.constants.metadata.KingdomsObject<SimpleChunkLocation>
org.kingdoms.constants.land.Land
You can find a variety of different methods in
ChunkConnections as well.-
Field Summary
Fields inherited from class org.kingdoms.constants.metadata.KingdomsObject
metadata -
Constructor Summary
ConstructorsConstructorDescriptionLand(@NonNull Kingdom kingdom, @NonNull SimpleChunkLocation chunk) Land(@NonNull SimpleChunkLocation chunk) Land(@NonNull SimpleChunkLocation location, @Nullable UUID kingdom, @Nullable UUID claimedBy, @NonNull Map<SimpleLocation, Structure> structures, @NonNull Map<SimpleLocation, Turret> turrets, @NonNull Map<SimpleLocation, ProtectionSign> protectedBlocks, long since) Land(@Nullable UUID kingdom, @NonNull SimpleChunkLocation chunk) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInvasion(@NonNull Invasion invasion) Adds an invasion that affects this land.voidendInvasions(Invasion.Result result) boolean@Nullable UUID@Nullable KingdomPlayer@NonNull String@NonNull SimpleChunkLocationA list of all ongoing invasions that are affecting this land with the keys as the invader's kingdom ID.@Nullable Kingdom@Nullable UUIDstatic @Nullable LandgetLand(@NonNull org.bukkit.block.Block block) static @Nullable LandgetLand(@NonNull org.bukkit.Chunk chunk) static @Nullable LandgetLand(@NonNull org.bukkit.Location location) static @Nullable LandgetLand(@NonNull SimpleChunkLocation loc) static @Nullable LandgetLand(@NonNull SimpleLocation loc) @NonNull SimpleChunkLocationstatic @Nullable NationZonegetNationZone(SimpleChunkLocation chunk) @NonNull Map<SimpleLocation,ProtectionSign> longgetSince()<T extends Structure>
TgetStructure(@NonNull Class<T> type) getStructure(@NonNull Predicate<Structure> predicate) @NonNull Map<SimpleLocation,Structure> @NonNull Map<SimpleLocation,Turret> inthashCode()booleanbooleanstatic booleanA shorthand method used null checks can't be done easily.booleanbooleanremoveInvasion(@NonNull UUID kingdom) removeInvasion(@NonNull Kingdom kingdom) voidsetClaimedBy(@Nullable UUID claimedBy) voidsetKingdom(@Nullable UUID kingdom) voidsetProtectedBlocks(@NonNull Map<SimpleLocation, ProtectionSign> protectedBlocks) voidsetSince(long since) voidsetTurrets(@NonNull Map<SimpleLocation, Turret> turrets) voidbooleansimpleEquals(@Nullable Land land) toString()unclaim(@Nullable KingdomPlayer by, UnclaimLandEvent.Reason reason) unclaim(@Nullable KingdomPlayer by, UnclaimLandEvent.Reason reason, boolean history) Methods inherited from class org.kingdoms.constants.metadata.KingdomsObject
compressBoolean, compressCollecton, compressCollecton, compressColor, compressInventory, compressLocation, compressLocation, compressMap, compressMetadata, compressString, compressUUID, getMetadata, getSaveMeta, setMetadata, setSaveMeta, shouldSave
-
Constructor Details
-
Land
public Land(@NonNull SimpleChunkLocation location, @Nullable UUID kingdom, @Nullable UUID claimedBy, @NonNull Map<SimpleLocation, Structure> structures, @NonNull Map<SimpleLocation, Turret> turrets, @NonNull Map<SimpleLocation, ProtectionSign> protectedBlocks, long since) -
Land
-
Land
-
Land
-
-
Method Details
-
getLand
-
getLand
-
getLand
-
isClaimed
A shorthand method used null checks can't be done easily. -
getLand
-
getLand
-
getNationZone
-
isHomeLand
public boolean isHomeLand() -
isClaimed
public boolean isClaimed() -
isNexusLand
public boolean isNexusLand() -
getStructure
-
getStructure
-
hashCode
public int hashCode() -
equals
-
simpleEquals
-
unclaim
-
unclaim
public UnclaimLandEvent unclaim(@Nullable KingdomPlayer by, UnclaimLandEvent.Reason reason, boolean history) -
silentUnclaim
public void silentUnclaim() -
getLocation
-
getDataKey
- Specified by:
getDataKeyin classKingdomsObject<SimpleChunkLocation>
-
toString
-
getCompressedData
- Specified by:
getCompressedDatain classKingdomsObject<SimpleChunkLocation>
-
getKingdom
-
setKingdom
-
isBeingInvaded
public boolean isBeingInvaded() -
getKingdomId
-
getStructures
-
getClaimedBy
-
setClaimedBy
-
getClaimer
-
getInvasions
A list of all ongoing invasions that are affecting this land with the keys as the invader's kingdom ID.- Returns:
- an unmodifiable map.
-
addInvasion
Adds an invasion that affects this land.- Parameters:
invasion- the invasion that's affecting this land.- Throws:
IllegalArgumentException- if the invasion is already added or the invasion doesn't affect this land.
-
endInvasions
-
removeInvasion
-
removeInvasion
-
getProtectedBlocks
-
setProtectedBlocks
-
getTurrets
-
setTurrets
-
getSince
public long getSince() -
setSince
public void setSince(long since)
-