TravelAgent

public interface TravelAgent

The Travel Agent handles the creation and the research of Nether and End portals when Entities try to use one.

It is used in org.bukkit.event.entity.EntityPortalEvent and in org.bukkit.event.player.PlayerPortalEvent to help developers reproduce and/or modify Vanilla behaviour.

Functions

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