Class StructureLocateEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.world.WorldEvent
io.papermc.paper.event.world.StructureLocateEvent
All Implemented Interfaces:
Cancellable

@Deprecated(forRemoval=true) @ScheduledForRemoval(inVersion="1.21") public class StructureLocateEvent extends WorldEvent implements Cancellable
Deprecated, for removal: This API element is subject to removal in a future version.
no longer used, see StructuresLocateEvent
Called before a structure/feature is located. This happens when:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    StructureLocateEvent(@NotNull World world, @NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the Location from which the search is to be conducted.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the search radius in which to attempt locating the structure.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the location set as the structure location, if it was defined.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the StructureType that is to be located.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the cancellation state of this event.
    void
    setCancelled(boolean cancel)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the cancellation state of this event.
    void
    setFindUnexplored(boolean findUnexplored)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets whether to search exclusively for unexplored structures.
    void
    setRadius(int radius)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the search radius in which to attempt locating the structure.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the result Location.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the StructureType that is to be located.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets whether to search exclusively for unexplored structures.

    Methods inherited from class org.bukkit.event.world.WorldEvent

    getWorld

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getHandlers in class Event
    • getResult

      @Nullable public @Nullable Location getResult()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the location set as the structure location, if it was defined.

      Returns null if it has not been set by setResult(Location). Since this event fires before the search is done, the actual location is unknown at this point.

      Returns:
      The result location, if it has been set. null if it has not.
      See Also:
    • setResult

      public void setResult(@Nullable @Nullable Location result)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the result Location. This causes the search to be skipped, and the location passed here to be used as the result.
      Parameters:
      result - the Location of the structure.
    • getType

      @NotNull public @NotNull StructureType getType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the StructureType that is to be located.
      Returns:
      the structure type.
    • setType

      public void setType(@NotNull @NotNull StructureType type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the StructureType that is to be located.
      Parameters:
      type - the structure type.
    • getOrigin

      @NotNull public @NotNull Location getOrigin()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the Location from which the search is to be conducted.
      Returns:
      Location where search begins
    • getRadius

      public int getRadius()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the search radius in which to attempt locating the structure.

      This radius may not always be obeyed during the structure search!

      Returns:
      the search radius.
    • setRadius

      public void setRadius(int radius)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the search radius in which to attempt locating the structure.

      This radius may not always be obeyed during the structure search!

      Parameters:
      radius - the search radius.
    • shouldFindUnexplored

      public boolean shouldFindUnexplored()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets whether to search exclusively for unexplored structures.

      As with the search radius, this value is not always obeyed.

      Returns:
      Whether to search for only unexplored structures.
    • setFindUnexplored

      public void setFindUnexplored(boolean findUnexplored)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets whether to search exclusively for unexplored structures.

      As with the search radius, this value is not always obeyed.

      Parameters:
      findUnexplored - Whether to search for only unexplored structures.
    • isCancelled

      public boolean isCancelled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Cancellable
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if this event is cancelled
    • setCancelled

      public void setCancelled(boolean cancel)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Cancellable
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - true if you wish to cancel this event