Package com.ryandw11.structure.io
Class NearbyStructuresResponse
java.lang.Object
com.ryandw11.structure.io.NearbyStructuresResponse
The response of the nearby request.
Returned in the CompletableFuture provided by StructureDatabaseHandler.findNearby(NearbyStructuresRequest)
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The container to contain the nearby structure results. -
Constructor Summary
ConstructorDescriptionNearbyStructuresResponse(@NotNull List<NearbyStructuresResponse.NearbyStructureContainer> response)
Construct a nearby structure response. -
Method Summary
Modifier and TypeMethodDescriptiongetFirst()
Get the closest nearby structure.Get the list of nearby structures.boolean
Check if any nearby structures were found.
-
Constructor Details
-
NearbyStructuresResponse
public NearbyStructuresResponse(@NotNull @NotNull List<NearbyStructuresResponse.NearbyStructureContainer> response)Construct a nearby structure response.For internal use only.
- Parameters:
response
- The list of nearby structures.
-
-
Method Details
-
getResponse
Get the list of nearby structures.- Returns:
- The list of nearby structures.
-
getFirst
Get the closest nearby structure.Use
hasEntries()
to check if there are any structures first.- Returns:
- The closest nearby structure. (Null if no structures are found).
-
hasEntries
public boolean hasEntries()Check if any nearby structures were found.- Returns:
- If any nearby structures were found.
-