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 Summary
Constructors Constructor Description WorldAreaFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWorldArea(@NotNull WorldArea area)Registers a new world area to the list of world areas.WorldAreafromLocation(@NotNull org.bukkit.Location location)Obtains a world area instance from location.booleanisAnyWorldAreaAt(@NotNull org.bukkit.Location location)Checks if there is any world area at provided location.
-
-
-
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.
-
-