public class TARDISTimeTravel
extends java.lang.Object
All TARDISes built after a certain point, including the Type 40 the Doctor uses, have a mathematically modelled duplicate of the Eye of harmony with all its attendant features.
Constructor and Description |
---|
TARDISTimeTravel(TARDIS plugin) |
Modifier and Type | Method and Description |
---|---|
static int[] |
getStartLocation(org.bukkit.Location loc,
COMPASS d)
Gets the starting location for safe location checking.
|
boolean |
isSafeSubmarine(org.bukkit.Location l,
COMPASS d) |
org.bukkit.Location |
randomDestination(org.bukkit.entity.Player p,
int rx,
int rz,
int ry,
COMPASS d,
java.lang.String e,
org.bukkit.World this_world,
boolean malfunction,
org.bukkit.Location current)
Retrieves a random location determined from the TARDIS repeater or terminal settings.
|
static int |
safeLocation(int startx,
int starty,
int startz,
int resetx,
int resetz,
org.bukkit.World w,
COMPASS d)
Checks if a random location is safe for the TARDIS Police Box to land at.
|
org.bukkit.Location |
submarine(org.bukkit.block.Block b,
COMPASS d) |
void |
testSafeLocation(org.bukkit.Location loc,
COMPASS d)
Checks if a location is safe for the TARDIS Police Box to land at.
|
public TARDISTimeTravel(TARDIS plugin)
public org.bukkit.Location randomDestination(org.bukkit.entity.Player p, int rx, int rz, int ry, COMPASS d, java.lang.String e, org.bukkit.World this_world, boolean malfunction, org.bukkit.Location current)
p
- a player object used to check permissions against.rx
- the delay setting of the x-repeater, this determines the distance in the x direction.rz
- the delay setting of the z-repeater, this determines the distance in the z direction.ry
- the delay setting of the y-repeater, this determines the multiplier for both the x and z
directions.d
- the direction the TARDIS Police Box faces.e
- the environment(s) the player has chosen (or is allowed) to travel to.this_world
- the world the Police Box is currently inmalfunction
- whether there should be a malfunctioncurrent
- the current location of the TARDISpublic static int safeLocation(int startx, int starty, int startz, int resetx, int resetz, org.bukkit.World w, COMPASS d)
startx
- a starting position in the x direction.starty
- a starting position in the y direction.startz
- a starting position in the z direction.resetx
- a copy of the starting x position to return to.resetz
- a copy of the starting z position to return to.w
- the world the location check will take place in.d
- the direction the Police Box is facing.public void testSafeLocation(org.bukkit.Location loc, COMPASS d)
loc
- the location to testd
- the direction the Police Box is facing.public static int[] getStartLocation(org.bukkit.Location loc, COMPASS d)
loc
- a location object to check.d
- the direction the Police Box is facing.public org.bukkit.Location submarine(org.bukkit.block.Block b, COMPASS d)
public boolean isSafeSubmarine(org.bukkit.Location l, COMPASS d)