Package be.seeseemelk.mockbukkit.entity
Class EntityMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
- All Implemented Interfaces:
MessageTarget,net.kyori.adventure.audience.Audience,net.kyori.adventure.pointer.Pointered,net.kyori.adventure.sound.Sound.Emitter,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>,org.bukkit.command.CommandSender,org.bukkit.entity.Entity,org.bukkit.metadata.Metadatable,org.bukkit.Nameable,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator,org.bukkit.persistence.PersistentDataHolder
- Direct Known Subclasses:
AbstractProjectileMock,AreaEffectCloudMock,DisplayMock,ExperienceOrbMock,HangingMock,ItemEntityMock,LivingEntityMock,MarkerMock,SimpleEntityMock,TNTPrimedMock,VehicleMock
public abstract class EntityMock
extends org.bukkit.entity.Entity.Spigot
implements org.bukkit.entity.Entity, MessageTarget
Mock implementation of an
Entity.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntityMock(@NotNull ServerMock server, @NotNull UUID uuid) Constructs a new EntityMock on the providedServerMockwith a specifiedUUID. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin) org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin, int ticks) @NotNull org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull String name, boolean value) org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull String name, boolean value, int ticks) booleanaddPassenger(@NotNull org.bukkit.entity.Entity passenger) booleanaddScoreboardTag(@NotNull String tag) @NotNull net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> voidassertLocation(@NotNull org.bukkit.Location expectedLocation, double maximumDistance) Assert that the actual location of the player is within a certain distance to a given location.voidAssert that the player hasn't teleported.voidassertTeleported(@NotNull org.bukkit.Location expectedLocation, double maximumDistance) Assert that the player teleported to a certain location within a certain distance to a given location.voidclearMetadata(org.bukkit.plugin.Plugin plugin) voidClears the teleported flag.booleancollidesAt(@NotNull org.bukkit.Location location) @NotNull org.bukkit.entity.Entitycopy()@NotNull org.bukkit.entity.Entitycopy(@NotNull org.bukkit.Location to) @Nullable org.bukkit.entity.EntitySnapshot@Nullable net.kyori.adventure.text.ComponentvoidcustomName(@Nullable net.kyori.adventure.text.Component customName) booleaneject()final booleanboolean@Nullable String@NotNull org.bukkit.util.BoundingBox@NotNull org.bukkit.ChunkgetChunk()@NotNull Set<org.bukkit.permissions.PermissionAttachmentInfo> intprotected com.google.gson.JsonElementgetEntityProperty(String field) @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReasonprotected EntityStateGet the current state of this entity@NotNull org.bukkit.block.BlockFacefloatintintdouble@Nullable org.bukkit.event.entity.EntityDamageEvent@NotNull org.bukkit.Locationorg.bukkit.LocationgetLocation(@Nullable org.bukkit.Location loc) intint@NotNull List<org.bukkit.metadata.MetadataValue> getMetadata(@NotNull String metadataKey) @NotNull StringgetName()@NotNull List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) @Nullable org.bukkit.Locationorg.bukkit.entity.EntityDeprecated.@NotNull List<org.bukkit.entity.Entity> @NotNull org.bukkit.persistence.PersistentDataContainer@NotNull org.bukkit.block.PistonMoveReactionfloatgetPitch()int@NotNull org.bukkit.entity.PosegetPose()@NotNull io.papermc.paper.threadedregions.scheduler.EntityScheduler@NotNull StringGets the scoreboard entry for this entity.@NotNull String@NotNull ServerMock@NotNull org.bukkit.entity.SpawnCategoryprotected EntitySubTypeGet the current subtype of the entity@NotNull org.bukkit.Sound@NotNull org.bukkit.Sound@NotNull org.bukkit.Soundorg.bukkit.event.player.PlayerTeleportEvent.TeleportCauseGet the cause of the last teleport.int@NotNull Set<org.bukkit.entity.Player> @NotNull Set<org.bukkit.entity.Player> @NotNull List<org.bukkit.entity.Entity> Gets a list of transitive passengers on this vehicle (passengers of passengers).@NotNull org.bukkit.entity.EntityTypegetType()@NotNull UUID@Nullable org.bukkit.entity.Entity@NotNull org.bukkit.util.VectordoublegetWidth()@NotNull WorldMockgetWorld()doublegetX()doublegetY()floatgetYaw()doublegetZ()booleanbooleanfinal inthashCode()booleanhasMetadata(@NotNull String metadataKey) booleanbooleanCheck if the entity has passengers.booleanhasPermission(@NotNull String name) booleanhasPermission(@NotNull org.bukkit.permissions.Permission perm) booleanChecks if the player has been teleported since the last assert orclearTeleported().booleanbooleanisDead()booleanisEmpty()booleanbooleanisFrozen()booleanbooleanbooleanisInLava()booleanbooleanisInRain()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisOp()booleanisPermissionSet(@NotNull String name) booleanisPermissionSet(@NotNull org.bukkit.permissions.Permission perm) booleanbooleanisSilent()booleanbooleanbooleanbooleanisValid()booleanbooleanbooleanvoidlockFreezeTicks(boolean locked) @NotNull net.kyori.adventure.text.Componentname()@Nullable net.kyori.adventure.text.ComponentReturns the next message that was sent to the target.voidplayEffect(@NotNull org.bukkit.EntityEffect type) voidvoidremove()voidremoveAttachment(@NotNull org.bukkit.permissions.PermissionAttachment attachment) voidremoveMetadata(@NotNull String metadataKey, @NotNull org.bukkit.plugin.Plugin owningPlugin) booleanremovePassenger(@NotNull org.bukkit.entity.Entity passenger) booleanremoveScoreboardTag(@NotNull String tag) voidsendMessage(@NotNull String message) voidsendMessage(String... messages) voidsendMessage(@Nullable UUID sender, @NotNull String message) voidsendMessage(UUID sender, String @NotNull ... messages) voidsendMessage(@NotNull net.kyori.adventure.identity.Identity source, @NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.audience.MessageType type) voidsetCustomName(@Nullable String name) voidsetCustomNameVisible(boolean flag) voidsetFallDistance(float distance) voidsetFireTicks(int ticks) voidsetFreezeTicks(int ticks) voidsetGlowing(boolean flag) voidsetGravity(boolean gravity) voidsetInvisible(boolean invisible) voidsetInvulnerable(boolean flag) voidsetLastDamageCause(@Nullable org.bukkit.event.entity.EntityDamageEvent event) Deprecated, for removal: This API element is subject to removal in a future version.voidsetLocation(@NotNull org.bukkit.Location location) Sets the location of the entity.voidsetMetadata(@NotNull String metadataKey, @NotNull org.bukkit.metadata.MetadataValue newMetadataValue) voidSets the name of this entity.voidsetNoPhysics(boolean noPhysics) voidsetOp(boolean isOperator) booleansetPassenger(@NotNull org.bukkit.entity.Entity passenger) Deprecated.voidsetPersistent(boolean persistent) voidsetPortalCooldown(int cooldown) voidsetPose(@NotNull org.bukkit.entity.Pose pose, boolean fixed) voidsetRotation(float yaw, float pitch) voidsetSilent(boolean silent) voidsetSneaking(boolean sneak) voidsetSpawnReason(org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) voidsetTicksLived(int value) voidsetVelocity(@NotNull org.bukkit.util.Vector velocity) voidsetVisibleByDefault(boolean visible) voidsetVisualFire(boolean fire) booleanspawnAt(@NotNull org.bukkit.Location location) booleanspawnAt(@NotNull org.bukkit.Location location, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) @NotNull org.bukkit.entity.Entity.Spigotspigot()@NotNull net.kyori.adventure.text.Componentbooleanteleport(@NotNull org.bukkit.Location location) booleanteleport(@NotNull org.bukkit.Location location, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) booleanteleport(@NotNull org.bukkit.Location location, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, io.papermc.paper.entity.TeleportFlag @NotNull ... flags) booleanteleport(@NotNull org.bukkit.entity.Entity destination) booleanteleport(@NotNull org.bukkit.entity.Entity destination, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) @NotNull CompletableFuture<Boolean> teleportAsync(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull ... teleportFlags) protected voidteleportWithoutEvent(@NotNull org.bukkit.Location location, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) Handles teleporting an entity without firing an event.booleanwouldCollideUsing(@NotNull org.bukkit.util.BoundingBox boundingBox) Methods inherited from class org.bukkit.command.CommandSender.Spigot
sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Entity
asHoverEvent, setPose, teleport, teleportAsync, teleportAsyncMethods inherited from interface be.seeseemelk.mockbukkit.command.MessageTarget
assertNoMoreSaid, assertSaid, assertSaid, nextMessageMethods inherited from interface org.bukkit.permissions.Permissible
permissionValue, permissionValueMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Field Details
-
server
-
-
Constructor Details
-
EntityMock
Constructs a new EntityMock on the providedServerMockwith a specifiedUUID.- Parameters:
server- The server to create the entity on.uuid- The UUID of the entity.
-
-
Method Details
-
hashCode
public final int hashCode() -
equals
-
assertLocation
public void assertLocation(@NotNull @NotNull org.bukkit.Location expectedLocation, double maximumDistance) Assert that the actual location of the player is within a certain distance to a given location.- Parameters:
expectedLocation- The location the player should be at.maximumDistance- The distance the player may maximumly be separated from the expected location.
-
assertTeleported
public void assertTeleported(@NotNull @NotNull org.bukkit.Location expectedLocation, double maximumDistance) Assert that the player teleported to a certain location within a certain distance to a given location. Also clears the teleported flag.- Parameters:
expectedLocation- The location the player should be at.maximumDistance- The distance the player may maximumly be separated from the expected location.
-
assertNotTeleported
public void assertNotTeleported()Assert that the player hasn't teleported. Also clears the teleported flag. -
hasTeleported
public boolean hasTeleported()Checks if the player has been teleported since the last assert orclearTeleported().- Returns:
trueif the player has been teleported,falseif he hasn't been teleported.
-
clearTeleported
public void clearTeleported()Clears the teleported flag. -
getTeleportCause
public org.bukkit.event.player.PlayerTeleportEvent.TeleportCause getTeleportCause()Get the cause of the last teleport.- Returns:
- The cause of the last teleport.
-
getUniqueId
- Specified by:
getUniqueIdin interfaceorg.bukkit.entity.Entity
-
getLocation
@NotNull public @NotNull org.bukkit.Location getLocation()- Specified by:
getLocationin interfaceorg.bukkit.entity.Entity
-
getTrackedPlayers
- Specified by:
getTrackedPlayersin interfaceorg.bukkit.entity.Entity
-
getLocation
public org.bukkit.Location getLocation(@Nullable @Nullable org.bukkit.Location loc) - Specified by:
getLocationin interfaceorg.bukkit.entity.Entity
-
setLocation
public void setLocation(@NotNull @NotNull org.bukkit.Location location) Sets the location of the entity. Note that this will not fire a teleport event.- Parameters:
location- The new location of the entity.
-
getWorld
- Specified by:
getWorldin interfaceorg.bukkit.entity.Entity
-
setMetadata
public void setMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull org.bukkit.metadata.MetadataValue newMetadataValue) - Specified by:
setMetadatain interfaceorg.bukkit.metadata.Metadatable
-
getMetadata
@NotNull public @NotNull List<org.bukkit.metadata.MetadataValue> getMetadata(@NotNull @NotNull String metadataKey) - Specified by:
getMetadatain interfaceorg.bukkit.metadata.Metadatable
-
hasMetadata
- Specified by:
hasMetadatain interfaceorg.bukkit.metadata.Metadatable
-
removeMetadata
public void removeMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull org.bukkit.plugin.Plugin owningPlugin) - Specified by:
removeMetadatain interfaceorg.bukkit.metadata.Metadatable
-
clearMetadata
public void clearMetadata(org.bukkit.plugin.Plugin plugin) - See Also:
-
getPersistentDataContainer
@NotNull public @NotNull org.bukkit.persistence.PersistentDataContainer getPersistentDataContainer()- Specified by:
getPersistentDataContainerin interfaceorg.bukkit.persistence.PersistentDataHolder
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.Location location) - Specified by:
teleportin interfaceorg.bukkit.entity.Entity
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) - Specified by:
teleportin interfaceorg.bukkit.entity.Entity
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, io.papermc.paper.entity.TeleportFlag @NotNull ... flags) - Specified by:
teleportin interfaceorg.bukkit.entity.Entity
-
teleportWithoutEvent
protected void teleportWithoutEvent(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) Handles teleporting an entity without firing an event. This will set the entity to the new location, mark teleport as true, and set the teleport cause.- Parameters:
location- The location to teleport to.cause- The teleport cause.
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.entity.Entity destination) - Specified by:
teleportin interfaceorg.bukkit.entity.Entity
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.entity.Entity destination, @NotNull @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) - Specified by:
teleportin interfaceorg.bukkit.entity.Entity
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceorg.bukkit.permissions.ServerOperator
-
setOp
public void setOp(boolean isOperator) - Specified by:
setOpin interfaceorg.bukkit.permissions.ServerOperator
-
getName
- Specified by:
getNamein interfaceorg.bukkit.command.CommandSender
-
getScoreboardEntry
Gets the scoreboard entry for this entity.- Returns:
- The scoreboard entry.
-
setName
Sets the name of this entity.- Parameters:
name- The new name of the entity.
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.identity.Identity source, @NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull net.kyori.adventure.audience.MessageType type) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
nextComponentMessage
@Nullable public @Nullable net.kyori.adventure.text.Component nextComponentMessage()Description copied from interface:MessageTargetReturns the next message that was sent to the target.- Specified by:
nextComponentMessagein interfaceMessageTarget- Returns:
- The next message sent to the target.
-
isPermissionSet
- Specified by:
isPermissionSetin interfaceorg.bukkit.permissions.Permissible
-
isPermissionSet
public boolean isPermissionSet(@NotNull @NotNull org.bukkit.permissions.Permission perm) - Specified by:
isPermissionSetin interfaceorg.bukkit.permissions.Permissible
-
hasPermission
- Specified by:
hasPermissionin interfaceorg.bukkit.permissions.Permissible
-
hasPermission
public boolean hasPermission(@NotNull @NotNull org.bukkit.permissions.Permission perm) - Specified by:
hasPermissionin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
@NotNull public @NotNull org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull String name, boolean value) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
@NotNull public @NotNull org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull String name, boolean value, int ticks) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, int ticks) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
removeAttachment
public void removeAttachment(@NotNull @NotNull org.bukkit.permissions.PermissionAttachment attachment) - Specified by:
removeAttachmentin interfaceorg.bukkit.permissions.Permissible
-
recalculatePermissions
public void recalculatePermissions()- Specified by:
recalculatePermissionsin interfaceorg.bukkit.permissions.Permissible
-
getEffectivePermissions
@NotNull public @NotNull Set<org.bukkit.permissions.PermissionAttachmentInfo> getEffectivePermissions()- Specified by:
getEffectivePermissionsin interfaceorg.bukkit.permissions.Permissible
-
customName
@Nullable public @Nullable net.kyori.adventure.text.Component customName()- Specified by:
customNamein interfaceorg.bukkit.Nameable
-
customName
public void customName(@Nullable @Nullable net.kyori.adventure.text.Component customName) - Specified by:
customNamein interfaceorg.bukkit.Nameable
-
getCustomName
- Specified by:
getCustomNamein interfaceorg.bukkit.Nameable
-
setCustomName
- Specified by:
setCustomNamein interfaceorg.bukkit.Nameable
-
setVelocity
public void setVelocity(@NotNull @NotNull org.bukkit.util.Vector velocity) - Specified by:
setVelocityin interfaceorg.bukkit.entity.Entity
-
getVelocity
@NotNull public @NotNull org.bukkit.util.Vector getVelocity()- Specified by:
getVelocityin interfaceorg.bukkit.entity.Entity
-
getHeight
public double getHeight()- Specified by:
getHeightin interfaceorg.bukkit.entity.Entity
-
getWidth
public double getWidth()- Specified by:
getWidthin interfaceorg.bukkit.entity.Entity
-
getEntityProperty
-
getEntityState
Get the current state of this entity- Returns:
- The current state of this entity
-
getSubType
Get the current subtype of the entity- Returns:
- The current subtype of the entity
-
isOnGround
public boolean isOnGround()- Specified by:
isOnGroundin interfaceorg.bukkit.entity.Entity
-
getNearbyEntities
@NotNull public @NotNull List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) - Specified by:
getNearbyEntitiesin interfaceorg.bukkit.entity.Entity
-
getEntityId
public int getEntityId()- Specified by:
getEntityIdin interfaceorg.bukkit.entity.Entity
-
getFireTicks
public int getFireTicks()- Specified by:
getFireTicksin interfaceorg.bukkit.entity.Entity
-
getMaxFireTicks
public int getMaxFireTicks()- Specified by:
getMaxFireTicksin interfaceorg.bukkit.entity.Entity
-
setFireTicks
public void setFireTicks(int ticks) - Specified by:
setFireTicksin interfaceorg.bukkit.entity.Entity
-
setVisualFire
public void setVisualFire(boolean fire) - Specified by:
setVisualFirein interfaceorg.bukkit.entity.Entity
-
isVisualFire
public boolean isVisualFire()- Specified by:
isVisualFirein interfaceorg.bukkit.entity.Entity
-
setFreezeTicks
public void setFreezeTicks(int ticks) - Specified by:
setFreezeTicksin interfaceorg.bukkit.entity.Entity
-
isFrozen
public boolean isFrozen()- Specified by:
isFrozenin interfaceorg.bukkit.entity.Entity
-
isFreezeTickingLocked
public boolean isFreezeTickingLocked()- Specified by:
isFreezeTickingLockedin interfaceorg.bukkit.entity.Entity
-
lockFreezeTicks
public void lockFreezeTicks(boolean locked) - Specified by:
lockFreezeTicksin interfaceorg.bukkit.entity.Entity
-
getFreezeTicks
public int getFreezeTicks()- Specified by:
getFreezeTicksin interfaceorg.bukkit.entity.Entity
-
getMaxFreezeTicks
public int getMaxFreezeTicks()- Specified by:
getMaxFreezeTicksin interfaceorg.bukkit.entity.Entity
-
remove
public void remove()- Specified by:
removein interfaceorg.bukkit.entity.Entity
-
isDead
public boolean isDead()- Specified by:
isDeadin interfaceorg.bukkit.entity.Entity
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.bukkit.entity.Entity
-
getServer
- Specified by:
getServerin interfaceorg.bukkit.command.CommandSender- Specified by:
getServerin interfaceorg.bukkit.entity.Entity
-
getPassenger
Deprecated.- Specified by:
getPassengerin interfaceorg.bukkit.entity.Entity
-
setPassenger
@Deprecated(since="1.12") public boolean setPassenger(@NotNull @NotNull org.bukkit.entity.Entity passenger) Deprecated.- Specified by:
setPassengerin interfaceorg.bukkit.entity.Entity
-
getPassengers
- Specified by:
getPassengersin interfaceorg.bukkit.entity.Entity
-
getTrackedBy
- Specified by:
getTrackedByin interfaceorg.bukkit.entity.Entity
-
getTransitivePassengers
Gets a list of transitive passengers on this vehicle (passengers of passengers).- Returns:
- An immutable list of passengers.
-
addPassenger
public boolean addPassenger(@NotNull @NotNull org.bukkit.entity.Entity passenger) - Specified by:
addPassengerin interfaceorg.bukkit.entity.Entity
-
removePassenger
public boolean removePassenger(@NotNull @NotNull org.bukkit.entity.Entity passenger) - Specified by:
removePassengerin interfaceorg.bukkit.entity.Entity
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceorg.bukkit.entity.Entity
-
hasPassengers
public boolean hasPassengers()Check if the entity has passengers.Convenience method for
isEmpty().- Returns:
trueif there is at least one passenger.
-
eject
public boolean eject()- Specified by:
ejectin interfaceorg.bukkit.entity.Entity
-
getFallDistance
public float getFallDistance()- Specified by:
getFallDistancein interfaceorg.bukkit.entity.Entity
-
setFallDistance
public void setFallDistance(float distance) - Specified by:
setFallDistancein interfaceorg.bukkit.entity.Entity
-
setLastDamageCause
@Deprecated(forRemoval=true, since="1.20.6") public void setLastDamageCause(@Nullable @Nullable org.bukkit.event.entity.EntityDamageEvent event) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setLastDamageCausein interfaceorg.bukkit.entity.Entity
-
getLastDamageCause
@Nullable public @Nullable org.bukkit.event.entity.EntityDamageEvent getLastDamageCause()- Specified by:
getLastDamageCausein interfaceorg.bukkit.entity.Entity
-
getTicksLived
public int getTicksLived()- Specified by:
getTicksLivedin interfaceorg.bukkit.entity.Entity
-
setTicksLived
public void setTicksLived(int value) - Specified by:
setTicksLivedin interfaceorg.bukkit.entity.Entity
-
playEffect
public void playEffect(@NotNull @NotNull org.bukkit.EntityEffect type) - Specified by:
playEffectin interfaceorg.bukkit.entity.Entity
-
getType
@NotNull public @NotNull org.bukkit.entity.EntityType getType()- Specified by:
getTypein interfaceorg.bukkit.entity.Entity
-
getSwimSound
@NotNull public @NotNull org.bukkit.Sound getSwimSound()- Specified by:
getSwimSoundin interfaceorg.bukkit.entity.Entity
-
getSwimSplashSound
@NotNull public @NotNull org.bukkit.Sound getSwimSplashSound()- Specified by:
getSwimSplashSoundin interfaceorg.bukkit.entity.Entity
-
getSwimHighSpeedSplashSound
@NotNull public @NotNull org.bukkit.Sound getSwimHighSpeedSplashSound()- Specified by:
getSwimHighSpeedSplashSoundin interfaceorg.bukkit.entity.Entity
-
isInsideVehicle
public boolean isInsideVehicle()- Specified by:
isInsideVehiclein interfaceorg.bukkit.entity.Entity
-
leaveVehicle
public boolean leaveVehicle()- Specified by:
leaveVehiclein interfaceorg.bukkit.entity.Entity
-
getVehicle
@Nullable public @Nullable org.bukkit.entity.Entity getVehicle()- Specified by:
getVehiclein interfaceorg.bukkit.entity.Entity
-
setCustomNameVisible
public void setCustomNameVisible(boolean flag) - Specified by:
setCustomNameVisiblein interfaceorg.bukkit.entity.Entity
-
isCustomNameVisible
public boolean isCustomNameVisible()- Specified by:
isCustomNameVisiblein interfaceorg.bukkit.entity.Entity
-
setGlowing
public void setGlowing(boolean flag) - Specified by:
setGlowingin interfaceorg.bukkit.entity.Entity
-
isGlowing
public boolean isGlowing()- Specified by:
isGlowingin interfaceorg.bukkit.entity.Entity
-
setInvulnerable
public void setInvulnerable(boolean flag) - Specified by:
setInvulnerablein interfaceorg.bukkit.entity.Entity
-
isInvulnerable
public boolean isInvulnerable()- Specified by:
isInvulnerablein interfaceorg.bukkit.entity.Entity
-
setInvisible
public void setInvisible(boolean invisible) - Specified by:
setInvisiblein interfaceorg.bukkit.entity.Entity
-
isInvisible
public boolean isInvisible()- Specified by:
isInvisiblein interfaceorg.bukkit.entity.Entity
-
setNoPhysics
public void setNoPhysics(boolean noPhysics) - Specified by:
setNoPhysicsin interfaceorg.bukkit.entity.Entity
-
teleportAsync
@NotNull public @NotNull CompletableFuture<Boolean> teleportAsync(@NotNull @NotNull org.bukkit.Location loc, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, @NotNull @NotNull io.papermc.paper.entity.TeleportFlag @NotNull ... teleportFlags) - Specified by:
teleportAsyncin interfaceorg.bukkit.entity.Entity
-
hasNoPhysics
public boolean hasNoPhysics()- Specified by:
hasNoPhysicsin interfaceorg.bukkit.entity.Entity
-
isSilent
public boolean isSilent()- Specified by:
isSilentin interfaceorg.bukkit.entity.Entity
-
setSilent
public void setSilent(boolean silent) - Specified by:
setSilentin interfaceorg.bukkit.entity.Entity
-
hasGravity
public boolean hasGravity()- Specified by:
hasGravityin interfaceorg.bukkit.entity.Entity
-
setGravity
public void setGravity(boolean gravity) - Specified by:
setGravityin interfaceorg.bukkit.entity.Entity
-
getPortalCooldown
public int getPortalCooldown()- Specified by:
getPortalCooldownin interfaceorg.bukkit.entity.Entity
-
setPortalCooldown
public void setPortalCooldown(int cooldown) - Specified by:
setPortalCooldownin interfaceorg.bukkit.entity.Entity
-
getScoreboardTags
- Specified by:
getScoreboardTagsin interfaceorg.bukkit.entity.Entity
-
addScoreboardTag
- Specified by:
addScoreboardTagin interfaceorg.bukkit.entity.Entity
-
removeScoreboardTag
- Specified by:
removeScoreboardTagin interfaceorg.bukkit.entity.Entity
-
getPistonMoveReaction
@NotNull public @NotNull org.bukkit.block.PistonMoveReaction getPistonMoveReaction()- Specified by:
getPistonMoveReactionin interfaceorg.bukkit.entity.Entity
-
setRotation
public void setRotation(float yaw, float pitch) - Specified by:
setRotationin interfaceorg.bukkit.entity.Entity
-
getBoundingBox
@NotNull public @NotNull org.bukkit.util.BoundingBox getBoundingBox()- Specified by:
getBoundingBoxin interfaceorg.bukkit.entity.Entity
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfaceorg.bukkit.entity.Entity
-
setPersistent
public void setPersistent(boolean persistent) - Specified by:
setPersistentin interfaceorg.bukkit.entity.Entity
-
getFacing
@NotNull public @NotNull org.bukkit.block.BlockFace getFacing()- Specified by:
getFacingin interfaceorg.bukkit.entity.Entity
-
getPose
@NotNull public @NotNull org.bukkit.entity.Pose getPose()- Specified by:
getPosein interfaceorg.bukkit.entity.Entity
-
isInWater
public boolean isInWater()- Specified by:
isInWaterin interfaceorg.bukkit.entity.Entity
-
getSpawnCategory
@NotNull public @NotNull org.bukkit.entity.SpawnCategory getSpawnCategory()- Specified by:
getSpawnCategoryin interfaceorg.bukkit.entity.Entity
-
copy
@NotNull public @NotNull org.bukkit.entity.Entity copy(@NotNull @NotNull org.bukkit.Location to) - Specified by:
copyin interfaceorg.bukkit.entity.Entity
-
copy
@NotNull public @NotNull org.bukkit.entity.Entity copy()- Specified by:
copyin interfaceorg.bukkit.entity.Entity
-
createSnapshot
@Nullable public @Nullable org.bukkit.entity.EntitySnapshot createSnapshot()- Specified by:
createSnapshotin interfaceorg.bukkit.entity.Entity
-
isInWorld
public boolean isInWorld()- Specified by:
isInWorldin interfaceorg.bukkit.entity.Entity
-
spigot
public @NotNull org.bukkit.entity.Entity.Spigot spigot()- Specified by:
spigotin interfaceorg.bukkit.command.CommandSender- Specified by:
spigotin interfaceorg.bukkit.entity.Entity
-
name
@NotNull public @NotNull net.kyori.adventure.text.Component name()- Specified by:
namein interfaceorg.bukkit.command.CommandSender
-
teamDisplayName
@NotNull public @NotNull net.kyori.adventure.text.Component teamDisplayName()- Specified by:
teamDisplayNamein interfaceorg.bukkit.entity.Entity
-
asHoverEvent
@NotNull public @NotNull net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent()- Specified by:
asHoverEventin interfacenet.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>
-
getOrigin
@Nullable public @Nullable org.bukkit.Location getOrigin()- Specified by:
getOriginin interfaceorg.bukkit.entity.Entity
-
fromMobSpawner
public boolean fromMobSpawner()- Specified by:
fromMobSpawnerin interfaceorg.bukkit.entity.Entity
-
getChunk
@NotNull public @NotNull org.bukkit.Chunk getChunk()- Specified by:
getChunkin interfaceorg.bukkit.entity.Entity
-
getEntitySpawnReason
public @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason()- Specified by:
getEntitySpawnReasonin interfaceorg.bukkit.entity.Entity
-
isUnderWater
public boolean isUnderWater()- Specified by:
isUnderWaterin interfaceorg.bukkit.entity.Entity
-
isInRain
public boolean isInRain()- Specified by:
isInRainin interfaceorg.bukkit.entity.Entity
-
isInBubbleColumn
public boolean isInBubbleColumn()- Specified by:
isInBubbleColumnin interfaceorg.bukkit.entity.Entity
-
isInWaterOrRain
public boolean isInWaterOrRain()- Specified by:
isInWaterOrRainin interfaceorg.bukkit.entity.Entity
-
isInWaterOrBubbleColumn
public boolean isInWaterOrBubbleColumn()- Specified by:
isInWaterOrBubbleColumnin interfaceorg.bukkit.entity.Entity
-
isInWaterOrRainOrBubbleColumn
public boolean isInWaterOrRainOrBubbleColumn()- Specified by:
isInWaterOrRainOrBubbleColumnin interfaceorg.bukkit.entity.Entity
-
isInLava
public boolean isInLava()- Specified by:
isInLavain interfaceorg.bukkit.entity.Entity
-
isTicking
public boolean isTicking()- Specified by:
isTickingin interfaceorg.bukkit.entity.Entity
-
spawnAt
public boolean spawnAt(@NotNull @NotNull org.bukkit.Location location) - Specified by:
spawnAtin interfaceorg.bukkit.entity.Entity
-
spawnAt
public boolean spawnAt(@NotNull @NotNull org.bukkit.Location location, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) - Specified by:
spawnAtin interfaceorg.bukkit.entity.Entity
-
isInPowderedSnow
public boolean isInPowderedSnow()- Specified by:
isInPowderedSnowin interfaceorg.bukkit.entity.Entity
-
collidesAt
public boolean collidesAt(@NotNull @NotNull org.bukkit.Location location) - Specified by:
collidesAtin interfaceorg.bukkit.entity.Entity
-
wouldCollideUsing
public boolean wouldCollideUsing(@NotNull @NotNull org.bukkit.util.BoundingBox boundingBox) - Specified by:
wouldCollideUsingin interfaceorg.bukkit.entity.Entity
-
getScheduler
@NotNull public @NotNull io.papermc.paper.threadedregions.scheduler.EntityScheduler getScheduler()- Specified by:
getSchedulerin interfaceorg.bukkit.entity.Entity
-
isSneaking
public boolean isSneaking()- Specified by:
isSneakingin interfaceorg.bukkit.entity.Entity
-
setSneaking
public void setSneaking(boolean sneak) - Specified by:
setSneakingin interfaceorg.bukkit.entity.Entity
-
setVisibleByDefault
public void setVisibleByDefault(boolean visible) - Specified by:
setVisibleByDefaultin interfaceorg.bukkit.entity.Entity
-
isVisibleByDefault
public boolean isVisibleByDefault()- Specified by:
isVisibleByDefaultin interfaceorg.bukkit.entity.Entity
-
setPose
public void setPose(@NotNull @NotNull org.bukkit.entity.Pose pose, boolean fixed) - Specified by:
setPosein interfaceorg.bukkit.entity.Entity
-
hasFixedPose
public boolean hasFixedPose()- Specified by:
hasFixedPosein interfaceorg.bukkit.entity.Entity
-
getX
public double getX()- Specified by:
getXin interfaceorg.bukkit.entity.Entity
-
getY
public double getY()- Specified by:
getYin interfaceorg.bukkit.entity.Entity
-
getZ
public double getZ()- Specified by:
getZin interfaceorg.bukkit.entity.Entity
-
getPitch
public float getPitch()- Specified by:
getPitchin interfaceorg.bukkit.entity.Entity
-
getYaw
public float getYaw()- Specified by:
getYawin interfaceorg.bukkit.entity.Entity
-
getScoreboardEntryName
- Specified by:
getScoreboardEntryNamein interfaceorg.bukkit.entity.Entity
-
setSpawnReason
@Internal public void setSpawnReason(org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) -
getAsString
- Specified by:
getAsStringin interfaceorg.bukkit.entity.Entity
-