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

public final class RegionBan extends Object
  • Constructor Details

    • RegionBan

      public RegionBan(long regionId, org.bukkit.OfflinePlayer player, String reason)
    • RegionBan

      public RegionBan(long regionId, UUID playerId, String reason, long bannedAt)
    • RegionBan

      public RegionBan(long id, long regionId, UUID playerId, String reason, long bannedAt)
  • 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.
    • getReason

      @Nullable public @Nullable String getReason()
    • setReason

      public void setReason(@Nullable @Nullable String reason)
    • getBannedAt

      public long getBannedAt()
    • setBannedAt

      public void setBannedAt(long bannedAt)