java.lang.Object
tfagaming.projects.minecraft.homestead.models.RegionChunk

public final class RegionChunk extends Object
  • 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

      public RegionChunk(long regionId, UUID worldId, int x, int z, long claimedAt, boolean forceLoaded)
    • RegionChunk

      public RegionChunk(long id, long regionId, UUID worldId, int x, int z, long claimedAt, boolean forceLoaded)
  • Method Details

    • setAutoUpdate

      public void setAutoUpdate(boolean autoUpdate)
      Toggle Auto-Update for caching. If true, any call for setters will automatically update the cache. Otherwise, only the instance of the class will be updated.
      Parameters:
      autoUpdate - Auto-Update toggle
    • getUniqueId

      public long getUniqueId()
    • getRegionId

      public long getRegionId()
    • setRegionId

      public void setRegionId(long regionId)
    • getRegion

      @Nullable public @Nullable Region getRegion()
      Returns the region by directly fetching with region ID from cache.
      Returns:
      The region if found, null otherwise.
    • getRegionName

      @NotNull public @NotNull String getRegionName()
      Returns the region name safely by directly fetching with region ID from cache.
      Returns:
      The region name if found, "?" otherwise.
    • getWorldId

      @NotNull public @NotNull UUID getWorldId()
    • setWorldId

      public void setWorldId(@NotNull @NotNull UUID worldId)
    • getWorld

      @Nullable public @Nullable org.bukkit.World getWorld()
    • getX

      public int getX()
    • setX

      public void setX(int x)
    • getZ

      public int getZ()
    • setZ

      public void setZ(int z)
    • 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 as toBukkitLocation(), without the highest block Y check.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object