Class RegionInvite
java.lang.Object
tfagaming.projects.minecraft.homestead.models.RegionInvite
-
Constructor Summary
ConstructorsConstructorDescriptionRegionInvite(long id, long regionId, UUID playerId, long invitedAt) RegionInvite(long regionId, UUID playerId, long invitedAt) RegionInvite(long regionId, org.bukkit.OfflinePlayer player) -
Method Summary
Modifier and TypeMethodDescriptionlong@Nullable org.bukkit.OfflinePlayer@NotNull UUID@NotNull StringReturns the player's name safely.@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.longvoidsetAutoUpdate(boolean autoUpdate) Toggle Auto-Update for caching.voidsetInvitedAt(long invitedAt) voidsetPlayer(@NotNull org.bukkit.OfflinePlayer player) voidsetPlayerId(@NotNull UUID playerId) voidsetRegionId(long regionId)
-
Constructor Details
-
RegionInvite
public RegionInvite(long regionId, org.bukkit.OfflinePlayer player) -
RegionInvite
-
RegionInvite
-
-
Method Details
-
setAutoUpdate
public void setAutoUpdate(boolean autoUpdate) Toggle Auto-Update for caching. Iftrue, 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
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.
-
getPlayerId
-
setPlayerId
-
getPlayer
@Nullable public @Nullable org.bukkit.OfflinePlayer getPlayer() -
setPlayer
public void setPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer player) -
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.
-
getInvitedAt
public long getInvitedAt() -
setInvitedAt
public void setInvitedAt(long invitedAt)
-