org.bukkit
Interface TravelAgent


public interface TravelAgent


Method Summary
 boolean createPortal(Location location)
          Attempt to create a portal near the given location.
 Location findOrCreate(Location location)
          Attempt to find a portal near the given location, if a portal is not found it will attempt to create one.
 Location findPortal(Location location)
          Attempt to find a portal near the given location.
 boolean getCanCreatePortal()
          Returns whether the TravelAgent will attempt to create a destination portal or not.
 int getCreationRadius()
          Gets the maximum radius from the given location to create a portal.
 int getSearchRadius()
          Gets the search radius value for finding an available portal.
 void setCanCreatePortal(boolean create)
          Sets whether the TravelAgent should attempt to create a destination portal or not.
 TravelAgent setCreationRadius(int radius)
          Sets the maximum radius from the given location to create a portal.
 TravelAgent setSearchRadius(int radius)
          Set the Block radius to search in for available portals.
 

Method Detail

setSearchRadius

TravelAgent setSearchRadius(int radius)
Set the Block radius to search in for available portals.

Parameters:
radius - The radius in which to search for a portal from the location.
Returns:
This travel agent.

getSearchRadius

int getSearchRadius()
Gets the search radius value for finding an available portal.

Returns:
Returns the currently set search radius.

setCreationRadius

TravelAgent setCreationRadius(int radius)
Sets the maximum radius from the given location to create a portal.

Parameters:
radius - The radius in which to create a portal from the location.
Returns:
This travel agent.

getCreationRadius

int getCreationRadius()
Gets the maximum radius from the given location to create a portal.

Returns:
Returns the currently set creation radius.

getCanCreatePortal

boolean getCanCreatePortal()
Returns whether the TravelAgent will attempt to create a destination portal or not.

Returns:
Return whether the TravelAgent should create a destination portal or not.

setCanCreatePortal

void setCanCreatePortal(boolean create)
Sets whether the TravelAgent should attempt to create a destination portal or not.

Parameters:
create - Sets whether the TravelAgent should create a destination portal or not.

findOrCreate

Location findOrCreate(Location location)
Attempt to find a portal near the given location, if a portal is not found it will attempt to create one.

Parameters:
location - The location where the search for a portal should begin.
Returns:
Returns the location of a portal which has been found or returns the location passed to the method if unsuccessful.

findPortal

Location findPortal(Location location)
Attempt to find a portal near the given location.

Parameters:
location - The desired location of the portal.
Returns:
Returns the location of the nearest portal to the location.

createPortal

boolean createPortal(Location location)
Attempt to create a portal near the given location.

Parameters:
location - The desired location of the portal.
Returns:
True if a nether portal was successfully created.


Copyright © 2013. All Rights Reserved.