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

public final class Region extends Object
  • Constructor Details

    • Region

      public Region(String name, org.bukkit.OfflinePlayer player)
    • Region

      public Region(String name, UUID ownerId)
    • Region

      public Region(long id, String name, UUID ownerId, long createdAt)
  • 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()
    • getName

      @NotNull public @NotNull String getName()
    • setName

      public void setName(@NotNull @NotNull String name)
    • getDisplayName

      @Nullable public @Nullable String getDisplayName()
    • setDisplayName

      public void setDisplayName(@Nullable @Nullable String displayName)
    • getDescription

      @Nullable public @Nullable String getDescription()
    • setDescription

      public void setDescription(@Nullable @Nullable String description)
    • getOwnerId

      @NotNull public @NotNull UUID getOwnerId()
    • setOwnerId

      public void setOwnerId(@NotNull @NotNull UUID ownerId)
    • getOwner

      @Nullable public @Nullable org.bukkit.OfflinePlayer getOwner()
    • setOwner

      public void setOwner(@NotNull @NotNull org.bukkit.OfflinePlayer owner)
    • getOwnerName

      @NotNull public @NotNull String getOwnerName()
      Returns the owner's name safely. If the player was not found by their ID, it will return "?" instead.
      Returns:
      The player's name if found, "?" otherwise.
    • isOwner

      public boolean isOwner(org.bukkit.OfflinePlayer player)
    • isOwner

      public boolean isOwner(UUID id)
    • getLocation

      @Nullable public @Nullable SeLocation getLocation()
    • setLocation

      public void setLocation(@Nullable @Nullable org.bukkit.Location location)
    • setLocation

      public void setLocation(@Nullable @Nullable SeLocation location)
    • resetLocation

      public void resetLocation()
    • getPlayerFlags

      public long getPlayerFlags()
    • setPlayerFlags

      public void setPlayerFlags(long playerFlags)
    • isPlayerFlagSet

      public boolean isPlayerFlagSet(long flag)
    • getWorldFlags

      public long getWorldFlags()
    • setWorldFlags

      public void setWorldFlags(long worldFlags)
    • isWorldFlagSet

      public boolean isWorldFlagSet(long flag)
    • getTaxes

      public double getTaxes()
    • setTaxes

      public void setTaxes(double taxes)
    • getBank

      public double getBank()
    • setBank

      public void setBank(double bank)
    • depositBank

      public void depositBank(double amount)
    • withdrawBank

      public void withdrawBank(double amount)
    • getMapColor

      public int getMapColor()
    • setMapColor

      public void setMapColor(int mapColor)
    • getMapIcon

      @Nullable public @Nullable String getMapIcon()
    • setMapIcon

      public void setMapIcon(@Nullable @Nullable String mapIcon)
    • getRent

      @Nullable public @Nullable SeRent getRent()
    • setRent

      public void setRent(@Nullable @Nullable SeRent rent)
    • getWeather

      public int getWeather()
    • setWeather

      public void setWeather(int weather)
    • getTime

      public int getTime()
    • setTime

      public void setTime(int time)
    • getWelcomeSign

      @Nullable public @Nullable SeLocation getWelcomeSign()
    • setWelcomeSign

      public void setWelcomeSign(@Nullable @Nullable SeLocation welcomeSign)
    • getUpkeepAt

      public long getUpkeepAt()
    • setUpkeepAt

      public void setUpkeepAt(long upkeepAt)
    • getCreatedAt

      public long getCreatedAt()
    • isPublic

      public boolean isPublic()
      Check if the region is public.
      Returns:
      true if the flags PASSTHROUGH (67108864L) and TELEPORT_SPAWN (33554432L) are allowed to global players, false otherwise.