Class RtpSearchCompleteEvent
java.lang.Object
org.bukkit.event.Event
net.godlycow.org.essc.api.rtp.event.RtpSearchCompleteEvent
public class RtpSearchCompleteEvent
extends org.bukkit.event.Event
Fired when the safe-location search finds a candidate location.
Observe-only: the search already finished, so this event cannot be cancelled.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionRtpSearchCompleteEvent(org.bukkit.entity.Player player, org.bukkit.World world, org.bukkit.Location location, int attempts) Creates a new RTP search complete event. -
Method Summary
Modifier and TypeMethodDescriptionintReturns how many search attempts were needed.static org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.LocationReturns the candidate location (a copy), ornullif none was found.org.bukkit.entity.PlayerReturns the requesting player.org.bukkit.WorldgetWorld()Returns the world that was searched.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
RtpSearchCompleteEvent
public RtpSearchCompleteEvent(org.bukkit.entity.Player player, org.bukkit.World world, org.bukkit.Location location, int attempts) Creates a new RTP search complete event.- Parameters:
player- the requesting playerworld- the world that was searchedlocation- the candidate location, ornullif none was foundattempts- how many search attempts were needed
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Returns the requesting player.- Returns:
- the player
-
getWorld
public org.bukkit.World getWorld()Returns the world that was searched.- Returns:
- the world
-
getLocation
public org.bukkit.Location getLocation()Returns the candidate location (a copy), ornullif none was found.- Returns:
- the location, or
null
-
getAttempts
public int getAttempts()Returns how many search attempts were needed.- Returns:
- attempt count
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-