Class NearbyStructuresRequest

java.lang.Object
com.ryandw11.structure.io.NearbyStructuresRequest

public class NearbyStructuresRequest extends Object
A request for retrieving structures near a location.

Submit this request to StructureDatabaseHandler.findNearby(NearbyStructuresRequest).

  • Constructor Details

    • NearbyStructuresRequest

      public NearbyStructuresRequest(org.bukkit.Location location)
      Request a single structure near the specified location.
      Parameters:
      location - The location.
    • NearbyStructuresRequest

      public NearbyStructuresRequest(org.bukkit.Location location, String structureName)
      Request a single structure of a specific type near the specified location.
      Parameters:
      location - The location.
      structureName - The name of the desired structure.
    • NearbyStructuresRequest

      public NearbyStructuresRequest(org.bukkit.Location location, Structure structure)
      Request a single structure of a specific type near the specified location.
      Parameters:
      location - The location.
      structure - The desired structure.
    • NearbyStructuresRequest

      public NearbyStructuresRequest(org.bukkit.Location location, int limit)
      Request structures near a specified location.
      Parameters:
      location - The location.
      limit - The number of structures to retrieve. (Not validated.)
    • NearbyStructuresRequest

      public NearbyStructuresRequest(org.bukkit.Location location, Structure structure, int limit)
      Request structures of a certain type near a specified location.
      Parameters:
      location - The location.
      structure - The desired structure type.
      limit - The number of structures to retrieve. (Not validated.)
    • NearbyStructuresRequest

      public NearbyStructuresRequest(org.bukkit.Location location, String structureName, int limit)
      Request structures of a certain type near a specified location.
      Parameters:
      location - The location.
      structureName - The desired structure type.
      limit - The number of structures to retrieve. (Not validated.)
  • Method Details

    • getLocation

      public org.bukkit.Location getLocation()
      Get the location of the request.
      Returns:
      The location of the request.
    • getName

      @Nullable public @Nullable String getName()
      Get the name of the specified structure.
      Returns:
      The name of the specified structure. (Null if not specified).
    • hasName

      public boolean hasName()
      Check if a structure name is specified.
      Returns:
      If a structure name is specified.
    • getLimit

      public int getLimit()
      Get the limit of the request.
      Returns:
      The limit of the request.