public interface NucleusSafeTeleportService
Modifier and Type | Method and Description |
---|---|
java.util.Optional<org.spongepowered.api.world.Location<org.spongepowered.api.world.World>> |
getSafeLocation(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location,
TeleportScanner scanner,
org.spongepowered.api.world.teleport.TeleportHelperFilter filter,
org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
Find a safe location around the given location, subject to the
given
TeleportScanner or TeleportHelperFilter . |
java.util.Optional<org.spongepowered.api.entity.Transform<org.spongepowered.api.world.World>> |
getSafeTransform(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location,
com.flowpowered.math.vector.Vector3d rotation,
TeleportScanner scanner,
org.spongepowered.api.world.teleport.TeleportHelperFilter filter,
org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
Find a safe location around the given location, subject to the
given
TeleportScanner or TeleportHelperFilter . |
TeleportResult |
teleportPlayer(org.spongepowered.api.entity.living.player.Player player,
org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location,
boolean centreBlock,
TeleportScanner scanner,
org.spongepowered.api.world.teleport.TeleportHelperFilter filter,
org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
Teleports a player to a specified location, using a
TeleportScanner that determines how to select a location. |
TeleportResult |
teleportPlayer(org.spongepowered.api.entity.living.player.Player player,
org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location,
com.flowpowered.math.vector.Vector3d rotation,
boolean centreBlock,
TeleportScanner scanner,
org.spongepowered.api.world.teleport.TeleportHelperFilter filter,
org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
Teleports a player to a specified location, using a
TeleportScanner that determines how to select a location. |
TeleportResult teleportPlayer(org.spongepowered.api.entity.living.player.Player player, org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location, boolean centreBlock, TeleportScanner scanner, org.spongepowered.api.world.teleport.TeleportHelperFilter filter, org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
TeleportScanner
that determines how to select a location.player
- The player to teleportlocation
- The approximate location to teleport tocentreBlock
- If true, teleport a player to the centre of a block
else, teleports to a conrner.scanner
- The TeleportScanner
to use to determine how to
select the next location when a safe location has not
been found.filter
- The first TeleportHelperFilter
to use to determine
whether a block is safe.filters
- Additional TeleportHelperFilter
s to use when
when determining whether a block is safe.TeleportResult teleportPlayer(org.spongepowered.api.entity.living.player.Player player, org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location, com.flowpowered.math.vector.Vector3d rotation, boolean centreBlock, TeleportScanner scanner, org.spongepowered.api.world.teleport.TeleportHelperFilter filter, org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
TeleportScanner
that determines how to select a location.player
- The player to teleportlocation
- The approximate location to teleport torotation
- The rotation of the player upon teleportcentreBlock
- If true, teleport a player to the centre of a block
else, teleports to a conrner.scanner
- The TeleportScanner
to use to determine how to
select the next location when a safe location has not
been found.filter
- The first TeleportHelperFilter
to use to determine
whether a block is safe.filters
- Additional TeleportHelperFilter
s to use when
when determining whether a block is safe.java.util.Optional<org.spongepowered.api.world.Location<org.spongepowered.api.world.World>> getSafeLocation(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location, TeleportScanner scanner, org.spongepowered.api.world.teleport.TeleportHelperFilter filter, org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
TeleportScanner
or TeleportHelperFilter
.location
- The location to find a safe location aroundscanner
- The TeleportScanner
to use to determine how to
select the next location when a safe location has not
been found.filter
- The first TeleportHelperFilter
to use to determine
whether a block is safe.filters
- Additional TeleportHelperFilter
s to use when
when determining whether a block is safe.Location
, if one is avaiable.java.util.Optional<org.spongepowered.api.entity.Transform<org.spongepowered.api.world.World>> getSafeTransform(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> location, com.flowpowered.math.vector.Vector3d rotation, TeleportScanner scanner, org.spongepowered.api.world.teleport.TeleportHelperFilter filter, org.spongepowered.api.world.teleport.TeleportHelperFilter... filters)
TeleportScanner
or TeleportHelperFilter
.location
- The location to find a safe location aroundrotation
- The rotation for the Transform
scanner
- The TeleportScanner
to use to determine how to
select the next location when a safe location has not
been found.filter
- The first TeleportHelperFilter
to use to determine
whether a block is safe.filters
- Additional TeleportHelperFilter
s to use when
when determining whether a block is safe.Location
, if one is avaiable.