Class WorldAreaFactory


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

      • WorldAreaFactory

        public WorldAreaFactory()
    • Method Detail

      • 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

        @Nullable
        public 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:
        World area instance in case of any, null otherwise.
      • 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.