Class WorldAreaFactory

java.lang.Object
me.nurio.minecraft.worldareas.areas.WorldAreaFactory

public class WorldAreaFactory extends Object
WorldAreaFactory manages active world areas, listing, search, etc.
  • Constructor Details

    • WorldAreaFactory

      public WorldAreaFactory()
  • Method Details

    • addWorldArea

      public void addWorldArea(@NotNull @NotNull WorldArea area)
      Registers a new world area to the list of world areas.
      Parameters:
      area - World area to register.
    • fromLocation

      @NotNull public @NotNull List<WorldArea> fromLocation(@NotNull @NotNull org.bukkit.Location location)
      Obtains a world area instance from location.
      Parameters:
      location - Location to check if there are any world area.
      Returns:
      List of WorldArea instances in case of any. Empty list otherwise.
    • fromUuid

      @Nullable public @Nullable WorldArea fromUuid(UUID uuid)
      Obtains a world area instance from his UUID.
      Parameters:
      uuid - WorldArea UUID
      Returns:
      WorldArea instance or null in case there is no matching area.
    • isAnyWorldAreaAt

      public boolean isAnyWorldAreaAt(@NotNull @NotNull org.bukkit.Location location)
      Checks if there is any world area at provided location. - Take care with calling this method before #fromLocation() that will be a performance waste.
      Parameters:
      location - Location to check if there are any world area.
      Returns:
      true in case there is any world area, false otherwise.