Package dev.espi.protectionstones
Class PSGroupRegion
java.lang.Object
dev.espi.protectionstones.PSRegion
dev.espi.protectionstones.PSStandardRegion
dev.espi.protectionstones.PSGroupRegion
Represents a region that exists but is a group of merged
PSStandardRegions.
Contains multiple PSMergedRegion representing the individual merged regions (which don't technically exist in WorldGuard).-
Nested Class Summary
Nested classes/interfaces inherited from class dev.espi.protectionstones.PSRegion
PSRegion.LastRegionTaxPaymentEntry, PSRegion.RentStage, PSRegion.TaxPayment -
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteRegion(boolean deleteBlock, org.bukkit.entity.Player cause)Deletes the region forever.Get the list ofPSMergedRegionobjects of the regions that were merged into this region.Get the list ofPSMergedRegionobjects of the regions that were merged into this region.Get the merged region whose ID is the same as the group region ID.Get the formatted period(s) allowed for the payment of tax.Get the formatted period(s) between tax payments for this region type.doubleGet the tax rate for this region type.booleanhasMergedRegion(String id)Check if this region contains a specific merged regionbooleanhide()Hides the protection block, if it is not hidden.voidRemoves the merged region's information from the object.booleanunhide()Unhides the protection block, if it is hidden.voidUpdate with the current time and calculate any tax payments that are now due.Methods inherited from class dev.espi.protectionstones.PSStandardRegion
addMember, addOwner, deleteRegion, forSale, getHome, getId, getLandlord, getMembers, getMergeableRegions, getName, getOwners, getParent, getPoints, getPrice, getProtectBlock, getRegionLastTaxPaymentAddedEntries, getRentLastPaid, getRentPeriod, getRentStage, getTaxAutopayer, getTaxPaymentsDue, getTenant, getType, getTypeOptions, getWGRegion, isMember, isOwner, isTaxPaymentLate, payTax, removeMember, removeOwner, removeRenting, rentOut, sell, setHome, setHome, setLandlord, setName, setParent, setPrice, setRegionLastTaxPaymentAddedEntries, setRentable, setRentLastPaid, setRentPeriod, setSellable, setTaxAutopayer, setTaxPaymentsDue, setTenant, setTypeMethods inherited from class dev.espi.protectionstones.PSRegion
equals, fromLocation, fromLocationGroup, fromLocationGroupUnsafe, fromLocationUnsafe, fromName, fromName, fromWGRegion, getID, getWGRegionManager, getWorld, hashCode, isHidden, toggleHide
-
Method Details
-
getTaxRate
public double getTaxRate()Description copied from class:PSRegionGet the tax rate for this region type.- Overrides:
getTaxRatein classPSRegion- Returns:
- the tax rate
-
getTaxPeriod
Description copied from class:PSRegionGet the formatted period(s) between tax payments for this region type. If you simply wanted the number of seconds, use getTypeOptions().taxPeriod- Overrides:
getTaxPeriodin classPSStandardRegion- Returns:
- the duration between tax payments, or multiple if there are several different ones
-
getTaxPaymentPeriod
Description copied from class:PSRegionGet the formatted period(s) allowed for the payment of tax. If you simply wanted the number of seconds, use getTypeOptions().taxPaymentTime- Overrides:
getTaxPaymentPeriodin classPSStandardRegion- Returns:
- the duration of time allowed to pay a tax, or multiple if there are several different ones
-
updateTaxPayments
public void updateTaxPayments()Description copied from class:PSRegionUpdate with the current time and calculate any tax payments that are now due.- Overrides:
updateTaxPaymentsin classPSStandardRegion
-
hide
public boolean hide()Description copied from class:PSRegionHides the protection block, if it is not hidden. -
unhide
public boolean unhide()Description copied from class:PSRegionUnhides the protection block, if it is hidden. -
deleteRegion
public boolean deleteRegion(boolean deleteBlock, org.bukkit.entity.Player cause)Description copied from class:PSRegionDeletes the region forever. Can be cancelled by event cancellation.- Overrides:
deleteRegionin classPSStandardRegion- Parameters:
deleteBlock- whether or not to also set the protection block to air (if not hidden)cause- the player that caused the region to break- Returns:
- whether or not the region was able to be successfully removed
-
getRootRegion
Get the merged region whose ID is the same as the group region ID.- Returns:
- the root region
-
hasMergedRegion
Check if this region contains a specific merged region- Parameters:
id- the psID that would've been generated if the merged region was a standard region- Returns:
- whether or not the id is a merged region
-
removeMergedRegionInfo
Removes the merged region's information from the object. Note: This DOES NOT remove the actual PSMergedRegion object, you have to call deleteRegion() on that as well.- Parameters:
id- the id of the merged region
-
getMergedRegions
Get the list ofPSMergedRegionobjects of the regions that were merged into this region.- Returns:
- the list of regions merged into this region
-
getMergedRegionsUnsafe
Get the list ofPSMergedRegionobjects of the regions that were merged into this region. Note: This is unsafe as it includesPSMergedRegions that are of types not configured in the config.- Returns:
- the list of regions merged into this region
-