Class Region
java.lang.Object
tfagaming.projects.minecraft.homestead.models.Region
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddepositBank(double amount) doublegetBank()long@Nullable String@Nullable String@Nullable SeLocationint@Nullable String@NotNull StringgetName()@Nullable org.bukkit.OfflinePlayergetOwner()@NotNull UUID@NotNull StringReturns the owner's name safely.long@Nullable SeRentgetRent()doublegetTaxes()intgetTime()longlongint@Nullable SeLocationlongbooleanbooleanisOwner(org.bukkit.OfflinePlayer player) booleanisPlayerFlagSet(long flag) booleanisPublic()Check if the region is public.booleanisWorldFlagSet(long flag) voidvoidsetAutoUpdate(boolean autoUpdate) Toggle Auto-Update for caching.voidsetBank(double bank) voidsetDescription(@Nullable String description) voidsetDisplayName(@Nullable String displayName) voidsetLocation(@Nullable org.bukkit.Location location) voidsetLocation(@Nullable SeLocation location) voidsetMapColor(int mapColor) voidsetMapIcon(@Nullable String mapIcon) voidvoidsetOwner(@NotNull org.bukkit.OfflinePlayer owner) voidsetOwnerId(@NotNull UUID ownerId) voidsetPlayerFlags(long playerFlags) voidvoidsetTaxes(double taxes) voidsetTime(int time) voidsetUpkeepAt(long upkeepAt) voidsetWeather(int weather) voidsetWelcomeSign(@Nullable SeLocation welcomeSign) voidsetWorldFlags(long worldFlags) voidwithdrawBank(double amount)
-
Constructor Details
-
Region
-
Region
-
Region
-
-
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() -
getName
-
setName
-
getDisplayName
-
setDisplayName
-
getDescription
-
setDescription
-
getOwnerId
-
setOwnerId
-
getOwner
@Nullable public @Nullable org.bukkit.OfflinePlayer getOwner() -
setOwner
public void setOwner(@NotNull @NotNull org.bukkit.OfflinePlayer owner) -
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
-
getLocation
-
setLocation
public void setLocation(@Nullable @Nullable org.bukkit.Location location) -
setLocation
-
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
-
setMapIcon
-
getRent
-
setRent
-
getWeather
public int getWeather() -
setWeather
public void setWeather(int weather) -
getTime
public int getTime() -
setTime
public void setTime(int time) -
getWelcomeSign
-
setWelcomeSign
-
getUpkeepAt
public long getUpkeepAt() -
setUpkeepAt
public void setUpkeepAt(long upkeepAt) -
getCreatedAt
public long getCreatedAt() -
isPublic
public boolean isPublic()Check if the region is public.
-