Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 70 lines 2.2 kB view raw
1package org.bukkit; 2 3public interface TravelAgent { 4 5 /** 6 * Set the Block radius to search in for available portals. 7 * 8 * @param radius The radius in which to search for a portal from the location. 9 * @return 10 */ 11 public TravelAgent setSearchRadius(int radius); 12 13 /** 14 * Gets the search radius value for finding an available portal. 15 * 16 * @return Returns the currently set search radius. 17 */ 18 public int getSearchRadius(); 19 20 /** 21 * Sets the maximum radius from the given location to create a portal. 22 * 23 * @param radius The radius in which to create a portal from the location. 24 * @return 25 */ 26 public TravelAgent setCreationRadius(int radius); 27 28 /** 29 * Gets the maximum radius from the given location to create a portal. 30 * 31 * @return Returns the currently set creation radius. 32 */ 33 public int getCreationRadius(); 34 35 /** 36 * Returns whether the TravelAgent will attempt to create a destination portal or not. 37 * 38 * @return Return whether the TravelAgent should create a destination portal or not. 39 */ 40 public boolean getCanCreatePortal(); 41 42 /** 43 * Sets whether the TravelAgent should attempt to create a destination portal or not. 44 * 45 * @param create Sets whether the TravelAgent should create a destination portal or not. 46 */ 47 public void setCanCreatePortal(boolean create); 48 49 /** 50 * Attempt to find a portal near the given location, if a portal is not found it will attempt to create one. 51 * 52 * @param location The location where the search for a portal should begin. 53 * @return Returns the location of a portal which has been found or returns the location passed to the method if unsuccessful. 54 */ 55 public Location findOrCreate(Location location); 56 57 /** 58 * Attempt to find a portal near the given location. 59 * 60 * @return Returns the location of the nearest portal to the location. 61 */ 62 public Location findPortal(Location location); 63 64 /** 65 * Attempt to create a portal near the given location. 66 * 67 * @return True if a nether portal was successfully created. 68 */ 69 public boolean createPortal(Location location); 70}