Package be.seeseemelk.mockbukkit.entity
Class ItemEntityMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.ItemEntityMock
- All Implemented Interfaces:
MessageTarget
,Frictional
,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>
,CommandSender
,Entity
,Item
,Metadatable
,Nameable
,Permissible
,ServerOperator
,PersistentDataHolder
Mock implementation of an
Item
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Field Summary
Fields inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
server
-
Constructor Summary
ConstructorDescriptionItemEntityMock
(@NotNull ServerMock server, @NotNull UUID uuid, @NotNull ItemStack item) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
@NotNull net.kyori.adventure.util.TriState
int
@NotNull ItemStack
@Nullable UUID
getOwner()
int
@Nullable UUID
@NotNull EntityType
getType()
boolean
void
setCanMobPickup
(boolean canMobPickup) void
setCanPlayerPickup
(boolean canPlayerPickup) void
setFrictionState
(@NotNull net.kyori.adventure.util.TriState state) void
setHealth
(int health) void
setItemStack
(@NotNull ItemStack stack) void
void
setPickupDelay
(int delay) void
setThrower
(@Nullable UUID thrower) void
setUnlimitedLifetime
(boolean unlimited) void
setWillAge
(boolean willAge) boolean
willAge()
Methods inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, asHoverEvent, assertLocation, assertNotTeleported, assertTeleported, clearMetadata, clearTeleported, collidesAt, customName, customName, eject, equals, fromMobSpawner, getBoundingBox, getChunk, getCustomName, getEffectivePermissions, getEntityId, getEntitySpawnReason, getEntityState, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getMetadata, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScheduler, getScoreboardEntry, getScoreboardTags, getServer, getSpawnCategory, getSubType, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTeleportCause, getTicksLived, getTrackedPlayers, getTransitivePassengers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, hashCode, hasMetadata, hasPassengers, hasPermission, hasPermission, hasTeleported, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, name, nextComponentMessage, playEffect, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setLocation, setMetadata, setName, setOp, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleportWithoutEvent, wouldCollideUsing
Methods inherited from class org.bukkit.command.CommandSender.Spigot
sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScheduler, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface be.seeseemelk.mockbukkit.command.MessageTarget
assertNoMoreSaid, assertSaid, assertSaid, nextMessage
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
ItemEntityMock
public ItemEntityMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid, @NotNull @NotNull ItemStack item) - Parameters:
server
- The server to create the entity on.uuid
- The UUID of the entity.item
- The item this entity represents.
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceEntity
- Overrides:
getType
in classEntityMock
-
getItemStack
- Specified by:
getItemStack
in interfaceItem
-
setItemStack
- Specified by:
setItemStack
in interfaceItem
-
getPickupDelay
public int getPickupDelay()- Specified by:
getPickupDelay
in interfaceItem
-
setPickupDelay
public void setPickupDelay(int delay) - Specified by:
setPickupDelay
in interfaceItem
-
setUnlimitedLifetime
public void setUnlimitedLifetime(boolean unlimited) - Specified by:
setUnlimitedLifetime
in interfaceItem
-
isUnlimitedLifetime
public boolean isUnlimitedLifetime()- Specified by:
isUnlimitedLifetime
in interfaceItem
-
setOwner
-
getOwner
-
setThrower
- Specified by:
setThrower
in interfaceItem
-
getThrower
- Specified by:
getThrower
in interfaceItem
-
canMobPickup
public boolean canMobPickup()- Specified by:
canMobPickup
in interfaceItem
-
setCanMobPickup
public void setCanMobPickup(boolean canMobPickup) - Specified by:
setCanMobPickup
in interfaceItem
-
canPlayerPickup
public boolean canPlayerPickup()- Specified by:
canPlayerPickup
in interfaceItem
-
setCanPlayerPickup
public void setCanPlayerPickup(boolean canPlayerPickup) - Specified by:
setCanPlayerPickup
in interfaceItem
-
willAge
public boolean willAge() -
setWillAge
public void setWillAge(boolean willAge) - Specified by:
setWillAge
in interfaceItem
-
getHealth
public int getHealth() -
setHealth
public void setHealth(int health) -
getFrictionState
@NotNull public @NotNull net.kyori.adventure.util.TriState getFrictionState()- Specified by:
getFrictionState
in interfaceFrictional
-
setFrictionState
public void setFrictionState(@NotNull @NotNull net.kyori.adventure.util.TriState state) - Specified by:
setFrictionState
in interfaceFrictional
-