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

public final class RegionRate extends Object
  • Constructor Details

    • RegionRate

      public RegionRate(long regionId, org.bukkit.OfflinePlayer player, int rate)
    • RegionRate

      public RegionRate(long regionId, UUID playerId, int rate, long ratedAt)
    • RegionRate

      public RegionRate(long id, long regionId, UUID playerId, int rate, long ratedAt)
  • 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.
    • getPlayerId

      @NotNull public @NotNull UUID getPlayerId()
    • setPlayerId

      public void setPlayerId(@NotNull @NotNull UUID playerId)
    • getPlayer

      @Nullable public @Nullable org.bukkit.OfflinePlayer getPlayer()
    • setPlayer

      public void setPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer player)
    • getPlayerName

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

      public int getRate()
    • setRate

      public void setRate(int rate)
    • getRatedAt

      public long getRatedAt()
    • setRatedAt

      public void setRatedAt(long ratedAt)