Package org.bukkit.block
Interface EndGateway
-
- All Superinterfaces:
BlockState,Metadatable,PersistentDataHolder,TileState
public interface EndGateway extends TileState
Represents a captured state of an end gateway.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetAge()Gets the age in ticks of the gateway.@Nullable LocationgetExitLocation()Gets the location that entities are teleported to when entering the gateway portal.booleanisExactTeleport()Gets whether this gateway will teleport entities directly to the exit location instead of finding a nearby location.voidsetAge(long age)Sets the age in ticks of the gateway.voidsetExactTeleport(boolean exact)Sets whether this gateway will teleport entities directly to the exit location instead of finding a nearby location.voidsetExitLocation(@Nullable Location location)Sets the exit location that entities are teleported to when they enter the gateway portal.-
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
-
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Methods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer
-
-
-
-
Method Detail
-
getExitLocation
@Nullable @Nullable 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.
- Returns:
- the gateway exit location
-
setExitLocation
void setExitLocation(@Nullable @Nullable Location location)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.
- Parameters:
location- the new exit location- Throws:
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.- Returns:
- 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.- Parameters:
exact- whether to teleport to the exact location
-
getAge
long getAge()
Gets the age in ticks of the gateway.
If the age is less than 200 ticks a magenta beam will be emitted, whilst if it is a multiple of 2400 ticks a purple beam will be emitted.- Returns:
- age in ticks
-
setAge
void setAge(long age)
Sets the age in ticks of the gateway.
If the age is less than 200 ticks a magenta beam will be emitted, whilst if it is a multiple of 2400 ticks a purple beam will be emitted.- Parameters:
age- new age in ticks
-
-