程序包 org.bukkit.block
接口 EndGateway
- 所有超级接口:
BlockState
,Metadatable
Represents a captured state of an end gateway.
-
方法概要
修饰符和类型方法说明Gets the location that entities are teleported to when entering the gateway portal.boolean
Gets whether this gateway will teleport entities directly to the exit location instead of finding a nearby location.void
setExactTeleport
(boolean exact) Sets whether this gateway will teleport entities directly to the exit location instead of finding a nearby location.void
setExitLocation
(Location location) Sets the exit location that entities are teleported to when they enter the gateway portal.从接口继承的方法 org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
方法详细资料
-
getExitLocation
Location getExitLocation()Gets the location that entities are teleported to when entering the gateway portal.If this block state is not placed the location's world will be null.
- 返回:
- the gateway exit location
-
setExitLocation
Sets the exit location that entities are teleported to when they enter the gateway portal.If this block state is not placed the location's world has to be null.
- 参数:
location
- the new exit location- 抛出:
IllegalArgumentException
- for differing worlds
-
isExactTeleport
boolean isExactTeleport()Gets whether this gateway will teleport entities directly to the exit location instead of finding a nearby location.- 返回:
- true if the gateway is teleporting to the exact location
-
setExactTeleport
void setExactTeleport(boolean exact) Sets whether this gateway will teleport entities directly to the exit location instead of finding a nearby location.- 参数:
exact
- whether to teleport to the exact location
-