Class RegionChunk
java.lang.Object
tfagaming.projects.minecraft.homestead.models.RegionChunk
-
Constructor Summary
ConstructorsConstructorDescriptionRegionChunk(long id, long regionId, UUID worldId, int x, int z, long claimedAt, boolean forceLoaded) RegionChunk(long regionId, UUID worldId, int x, int z, long claimedAt, boolean forceLoaded) RegionChunk(long regionId, org.bukkit.Chunk chunk) RegionChunk(long regionId, org.bukkit.World world, int x, int z) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlong@Nullable RegionReturns the region by directly fetching with region ID from cache.long@NotNull StringReturns the region name safely by directly fetching with region ID from cache.long@Nullable org.bukkit.WorldgetWorld()@NotNull UUIDintgetX()intgetZ()inthashCode()booleanvoidsetClaimedAt(long claimedAt) voidsetForceLoaded(boolean forceLoaded) voidsetRegionId(long regionId) @Nullable org.bukkit.ChunktoBukkit()@Nullable org.bukkit.LocationExactly the same astoBukkitLocation(), without the highest block Y check.@Nullable org.bukkit.Location
-
Constructor Details
-
RegionChunk
public RegionChunk(long regionId, org.bukkit.Chunk chunk) -
RegionChunk
public RegionChunk(long regionId, org.bukkit.World world, int x, int z) -
RegionChunk
-
RegionChunk
public RegionChunk(long id, long regionId, UUID worldId, int x, int z, long claimedAt, boolean forceLoaded)
-
-
Method Details
-
getUniqueId
public long getUniqueId() -
getRegionId
public long getRegionId() -
setRegionId
public void setRegionId(long regionId) -
getRegion
Returns the region by directly fetching with region ID from cache.- Returns:
- The region if found,
nullotherwise.
-
getRegionName
Returns the region name safely by directly fetching with region ID from cache.- Returns:
- The region name if found,
"?"otherwise.
-
getWorldId
-
getWorld
@Nullable public @Nullable org.bukkit.World getWorld() -
getX
public int getX() -
getZ
public int getZ() -
getClaimedAt
public long getClaimedAt() -
setClaimedAt
public void setClaimedAt(long claimedAt) -
isForceLoaded
public boolean isForceLoaded() -
setForceLoaded
public void setForceLoaded(boolean forceLoaded) -
toBukkit
@Nullable public @Nullable org.bukkit.Chunk toBukkit() -
toBukkitLocation
@Nullable public @Nullable org.bukkit.Location toBukkitLocation() -
toBukkitDisplayLocation
@Nullable public @Nullable org.bukkit.Location toBukkitDisplayLocation()Exactly the same astoBukkitLocation(), without the highest block Y check. -
equals
-
hashCode
public int hashCode()
-