Class PSGroupRegion


public class PSGroupRegion extends PSStandardRegion
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).
  • Method Details

    • getTaxRate

      public double getTaxRate()
      Description copied from class: PSRegion
      Get the tax rate for this region type.
      Overrides:
      getTaxRate in class PSRegion
      Returns:
      the tax rate
    • getTaxPeriod

      public String getTaxPeriod()
      Description copied from class: PSRegion
      Get the formatted period(s) between tax payments for this region type. If you simply wanted the number of seconds, use getTypeOptions().taxPeriod
      Overrides:
      getTaxPeriod in class PSStandardRegion
      Returns:
      the duration between tax payments, or multiple if there are several different ones
    • getTaxPaymentPeriod

      public String getTaxPaymentPeriod()
      Description copied from class: PSRegion
      Get the formatted period(s) allowed for the payment of tax. If you simply wanted the number of seconds, use getTypeOptions().taxPaymentTime
      Overrides:
      getTaxPaymentPeriod in class PSStandardRegion
      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: PSRegion
      Update with the current time and calculate any tax payments that are now due.
      Overrides:
      updateTaxPayments in class PSStandardRegion
    • hide

      public boolean hide()
      Description copied from class: PSRegion
      Hides the protection block, if it is not hidden.
      Overrides:
      hide in class PSRegion
      Returns:
      whether or not the block was hidden
    • unhide

      public boolean unhide()
      Description copied from class: PSRegion
      Unhides the protection block, if it is hidden.
      Overrides:
      unhide in class PSRegion
      Returns:
      whether or not the block was unhidden
    • deleteRegion

      public boolean deleteRegion(boolean deleteBlock, org.bukkit.entity.Player cause)
      Description copied from class: PSRegion
      Deletes the region forever. Can be cancelled by event cancellation.
      Overrides:
      deleteRegion in class PSStandardRegion
      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

      public PSMergedRegion getRootRegion()
      Get the merged region whose ID is the same as the group region ID.
      Returns:
      the root region
    • hasMergedRegion

      public boolean hasMergedRegion(String id)
      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

      public void removeMergedRegionInfo(String id)
      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

      public List<PSMergedRegion> getMergedRegions()
      Get the list of PSMergedRegion objects of the regions that were merged into this region.
      Returns:
      the list of regions merged into this region
    • getMergedRegionsUnsafe

      public List<PSMergedRegion> getMergedRegionsUnsafe()
      Get the list of PSMergedRegion objects of the regions that were merged into this region. Note: This is unsafe as it includes PSMergedRegions that are of types not configured in the config.
      Returns:
      the list of regions merged into this region