Class RegionManager

java.lang.Object
net.dzikoysk.funnyguilds.guild.RegionManager

public class RegionManager extends Object
  • Constructor Details

  • Method Details

    • countRegions

      public int countRegions()
    • getRegions

      public Set<Region> getRegions()
      Gets the copied set of regions.
      Returns:
      set of regions
    • clearRegions

      public void clearRegions()
      Deletes all loaded regions data
    • findByName

      public panda.std.Option<Region> findByName(String name, boolean ignoreCase)
      Gets the region.
      Parameters:
      name - the name of region (probably name of guild)
      ignoreCase - ignore the case of the tag
      Returns:
      the guild
    • findByName

      public panda.std.Option<Region> findByName(String name)
      Gets the region.
      Parameters:
      name - the name of region (probably name of guild)
      Returns:
      the region
    • findRegionAtLocation

      public panda.std.Option<Region> findRegionAtLocation(org.bukkit.Location location)
      Gets the region.
      Parameters:
      location - the location of region
      Returns:
      the region
    • isInRegion

      public boolean isInRegion(org.bukkit.Location location)
      Checks if there is a region in the given location.
      Parameters:
      location - the location of region
      Returns:
      if given location is in region
    • isAnyPlayerInRegion

      public boolean isAnyPlayerInRegion(Region region, Collection<UUID> ignoredUuids)
    • isAnyPlayerInRegion

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public boolean isAnyPlayerInRegion(Region region)
      Deprecated.
    • isAnyUserInRegion

      public boolean isAnyUserInRegion(Region region, Collection<User> ignoredUsers)
    • isAnyUserInRegion

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public boolean isAnyUserInRegion(panda.std.Option<Region> regionOption, Collection<User> ignoredUsers)
      Deprecated.
    • isNearRegion

      public boolean isNearRegion(org.bukkit.Location center)
      Checks if there is any region in area (used to check if it's possible to create a new guild in given location).
      Parameters:
      center - the center of region
      Returns:
      if is region nearby
    • isNearRegion

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public boolean isNearRegion(panda.std.Option<org.bukkit.Location> center)
      Deprecated.
    • isGuildHeart

      public boolean isGuildHeart(org.bukkit.block.Block block)
      Checks if given block is guild's heart.
      Parameters:
      block - block to check
      Returns:
      if given block is guild's heart
    • addRegion

      public void addRegion(Region region)
      Add region to storage. If you think you should use this method you probably shouldn't.
      Parameters:
      region - region to add
    • removeRegion

      public void removeRegion(Region region)
      Remove region from storage. If you think you should use this method you probably shouldn't - instead use deleteRegion(DataModel, Region).
      Parameters:
      region - region to remove
    • moveRegionCenter

      public void moveRegionCenter(Region region, org.bukkit.Location center)
    • changeRegionEnlargement

      public void changeRegionEnlargement(Region region, int level)
    • deleteRegion

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public void deleteRegion(DataModel dataModel, Region region)
      Deprecated.
      for removal in the future with database rework (GH-1402)
      Delete region from storage and from database.
      Parameters:
      region - region to delete
    • regionExists

      public boolean regionExists(String name)
      Checks if region with given name exists.
      Parameters:
      name - region name
      Returns:
      if region exists