Package com.griefdefender.api.data
Interface EconomyData
- All Superinterfaces:
EconomyDataGetter
Contains all economy data of a
Claim.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPaymentTransaction(PaymentTransaction transaction) Adds a payment transaction to theClaimlog.static EconomyData.Builderbuilder()Gets a new economy data builder instance forEconomyData.Builder.voidClears the payment transactions.voidsetForRent(boolean forRent) Enables or disables the rental ofClaim.voidsetForSale(boolean forSale) Enables or disables the sale ofClaim.voidsetPaymentType(PaymentType type) Sets the {link PaymentType}.voidsetRentBalance(UUID uuid, double balance) Sets the rent balance ofUser.voidsetRentBreakAbility(boolean breakAbility) Sets whether renters or rental trusted users have the ability to break owner blocks inClaim.voidsetRentEndDate(@Nullable Instant date) Sets the rent end date.voidsetRentMaxTime(int max) Sets the maximum time to rent.voidsetRentMinTime(int min) Sets the minimum time to rent.voidsetRentPastDueDate(@Nullable Instant date) Sets the new rent past due date.voidsetRentRate(double rate) Sets a rent rate forClaim.voidsetRentSignPosition(int x, int y, int z) Sets the sign position of claim being rented.voidsetRentSignPosition(@Nullable com.flowpowered.math.vector.Vector3i pos) Sets the sign position of claim being rented.voidsetRentStartDate(@Nullable Instant date) Sets the rent start date.voidsetRentStripNbt(boolean stripNbt) Sets whether a rented claim will strip all block NBT data on restore.voidsetSaleEndDate(@Nullable Instant date) Sets the sale end date.voidsetSalePrice(double price) Sets a sale price forClaim.voidsetSaleSignPosition(int x, int y, int z) Sets the sign position of claim being sold.voidsetSaleSignPosition(@Nullable com.flowpowered.math.vector.Vector3i pos) Sets the sign position of claim being sold.voidsetTaxBalance(double balance) Sets the tax balance ofClaim.voidsetTaxPastDueDate(@Nullable Instant date) Sets the new tax past due date.Methods inherited from interface com.griefdefender.api.data.EconomyDataGetter
getDelinquentRenters, getPaymentTransactions, getPaymentType, getRentBalance, getRentBalances, getRentBreakAbility, getRentEndDate, getRenters, getRentMaxTime, getRentMinTime, getRentPastDueDate, getRentPaymentDueDate, getRentRate, getRentSignPosition, getRentStartDate, getRentStripNbt, getSaleEndDate, getSalePrice, getSaleSignPosition, getTaxBalance, getTaxPastDueDate, isForRent, isForSale, isRented, isUserRenting, isUserRenting
-
Method Details
-
setRentSignPosition
void setRentSignPosition(@Nullable com.flowpowered.math.vector.Vector3i pos) Sets the sign position of claim being rented.- Parameters:
pos- The rent sign pos
-
setRentSignPosition
void setRentSignPosition(int x, int y, int z) Sets the sign position of claim being rented.- Parameters:
x- The x posy- The y posz- The z pos
-
setSaleSignPosition
void setSaleSignPosition(@Nullable com.flowpowered.math.vector.Vector3i pos) Sets the sign position of claim being sold.- Parameters:
pos- The sell sign pos
-
setSaleSignPosition
void setSaleSignPosition(int x, int y, int z) Sets the sign position of claim being sold.- Parameters:
x- The x posy- The y posz- The z pos
-
setRentBalance
Sets the rent balance ofUser.- Parameters:
uuid- The user uuidbalance- The new rent balance
-
setRentBreakAbility
void setRentBreakAbility(boolean breakAbility) Sets whether renters or rental trusted users have the ability to break owner blocks inClaim.- Parameters:
breakAbility-
-
clearPaymentTransactions
Clears the payment transactions.- Parameters:
type- The payment transaction type
-
setPaymentType
Sets the {link PaymentType}.- Parameters:
type- The payment type
-
setRentMinTime
void setRentMinTime(int min) Sets the minimum time to rent. Note: The time is based onEconomyDataGetter.getPaymentType().- Parameters:
min- The min rent time
-
setRentMaxTime
void setRentMaxTime(int max) Sets the maximum time to rent. Note: The time is based onEconomyDataGetter.getPaymentType().- Parameters:
max- The max rent time
-
setRentPastDueDate
Sets the new rent past due date.- Parameters:
date- The new date
-
setRentStartDate
Sets the rent start date.- Parameters:
date- The start date
-
setRentEndDate
Sets the rent end date. Note: If set, renters may rent until end date. Once end date is reached, the claim will no longer be rentable.- Parameters:
date- The end date
-
setRentRate
void setRentRate(double rate) Sets a rent rate forClaim.- Parameters:
rate-
-
setRentStripNbt
void setRentStripNbt(boolean stripNbt) Sets whether a rented claim will strip all block NBT data on restore. Note: This is only used when a rented claim is restored on rental end.- Parameters:
stripNbt-
-
setSaleEndDate
Sets the sale end date. Note: The claim will no longer be for sale when end date is reached.- Parameters:
date- The end date
-
setSalePrice
void setSalePrice(double price) Sets a sale price forClaim.- Parameters:
price- The sale price
-
setForRent
void setForRent(boolean forRent) Enables or disables the rental ofClaim.- Parameters:
forRent- true to enable, false to disable
-
setForSale
void setForSale(boolean forSale) Enables or disables the sale ofClaim.- Parameters:
forSale- true to enable, false to disable
-
setTaxBalance
void setTaxBalance(double balance) Sets the tax balance ofClaim.- Parameters:
balance- The new tax balance
-
setTaxPastDueDate
Sets the new tax past due date.- Parameters:
date- The new date
-
addPaymentTransaction
Adds a payment transaction to theClaimlog.- Parameters:
transaction- The payment transaction
-
builder
Gets a new economy data builder instance forEconomyData.Builder.- Returns:
- A new economy data builder instance
-