Interface Entity
- All Superinterfaces:
CommandSource, HoverEventSource<HoverEvent.ShowEntity>, Sound.Emitter, Sound.Source.Provider
- All Known Subinterfaces:
Damageable, LivingEntity, Player
public interface Entity
extends CommandSource, HoverEventSource<HoverEvent.ShowEntity>, Sound.Emitter, Sound.Source.Provider
-
Method Summary
Modifier and TypeMethodDescriptiondefault ChunkPoschunk()intentityId()booleanlocation()Gets the location that this command is being executed at.voidremove()default booleanteleport(double x, double y, double z) default booleanbooleanTeleports this entity to the given location within its current world.booleanTeleports this entity to the given location, moving it toworldwhen that differs from its current world.type()uuid()world()Methods inherited from interface CommandSource
executor, sender, serverMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface Sound.Source.Provider
soundSource
-
Method Details
-
entityId
int entityId() -
uuid
UUID uuid() -
displayName
Component displayName() -
type
EntityType type() -
world
World world() -
location
Location location()Description copied from interface:CommandSourceGets the location that this command is being executed at.- Specified by:
locationin interfaceCommandSource- Returns:
- a cloned location instance.
-
chunk
-
isRemoved
boolean isRemoved() -
remove
void remove() -
teleport
-
teleport
Teleports this entity to the given location, moving it toworldwhen that differs from its current world.Cross-world teleports relocate the entity between worlds and, for players, trigger the client-side dimension change. The call is refused, returning
false, when the entity is removed or the destination world cannot host it.- Parameters:
world- the destination worldlocation- the destination position and orientation- Returns:
trueif the teleport happened,falseif it was refused- Since:
- 0.1.0
-
teleport
default boolean teleport(double x, double y, double z) - Parameters:
x- the destination x coordinatey- the destination y coordinatez- the destination z coordinate- Returns:
trueif the teleport happened,falseif it was refused- Since:
- 0.1.0
-
teleport
- Parameters:
target- the entity to teleport to- Returns:
trueif the teleport happened,falseif it was refused- Since:
- 0.1.0
-