Package be.seeseemelk.mockbukkit.entity
Class AllayMock
- 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>
,Attributable
,CommandSender
,Allay
,Creature
,Damageable
,Entity
,LivingEntity
,Mob
,InventoryHolder
,Lootable
,Metadatable
,Nameable
,Permissible
,ServerOperator
,PersistentDataHolder
,ProjectileSource
Mock implementation of an
Allay
.- 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.LivingEntityMock
alive, attributes, health
Fields inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
server
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertCurrentItem
(@NotNull Material item) void
assertCurrentItem
(@NotNull Material item, @Nullable String message) void
Asserts that the Allay's inventory contains an item.void
assertInventoryContains
(ItemStack item, String s) Asserts that the Allay's inventory contains an item.boolean
@Nullable Allay
long
@NotNull Inventory
@Nullable Location
getType()
boolean
void
void
setCanDuplicate
(boolean canDuplicate) void
setDuplicationCooldown
(long cooldown) void
simulateItemPickup
(@NotNull ItemStack item) Simulate the Allay picking up anItemStack
from the ground.@Nullable ItemStack
Simulate the retrieval of the Allay's current items.void
simulatePlayerInteract
(@NotNull Material material) Simulates the Interaction of a Player with the Allay to set it's current item.void
void
startDancing
(@NotNull Location location) void
Methods inherited from class be.seeseemelk.mockbukkit.entity.MobMock
finalizeSpawn, getAmbientSound, getHeadRotationSpeed, getLootTable, getMaxHeadPitch, getPathfinder, getPossibleExperienceReward, getSeed, getTarget, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAware, setLeftHanded, setLootTable, setSeed, setTarget
Methods inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
addPotionEffect, addPotionEffect, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, clearActiveItem, clearActivePotionEffects, damage, damage, damageItemStack, damageItemStack, getAbsorptionAmount, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getFrictionState, getHandRaised, getHandRaisedTime, getHealth, getHurtDirection, getHurtSound, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isDead, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, isValid, knockback, launchProjectile, launchProjectile, launchProjectile, playHurtAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, registerAttribute, remove, removePotionEffect, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setFrictionState, setGliding, setHealth, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHand, teleport
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, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntry, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSubType, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTeleportCause, getTicksLived, getTrackedPlayers, getTransitivePassengers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hashCode, hasMetadata, hasPassengers, hasPermission, hasPermission, hasTeleported, isCustomNameVisible, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, name, nextComponentMessage, playEffect, recalculatePermissions, 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, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, 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 org.bukkit.attribute.Attributable
getAttribute, registerAttribute
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, sendRichMessage
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
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, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, 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, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface io.papermc.paper.entity.Frictional
getFrictionState, setFrictionState
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, clearActiveItem, clearActivePotionEffects, damageItemStack, damageItemStack, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHandRaised, getHandRaisedTime, getHurtDirection, getHurtSound, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, knockback, playHurtAnimation, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, rayTraceEntities, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingHand, swingMainHand, swingOffHand
Methods inherited from interface org.bukkit.loot.Lootable
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed
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.entity.Mob
getAmbientSound, getEquipment, getHeadRotationSpeed, getMaxHeadPitch, getPathfinder, getPossibleExperienceReward, getTarget, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAware, setLeftHanded, setTarget
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.projectiles.ProjectileSource
launchProjectile, launchProjectile, launchProjectile
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
AllayMock
- Parameters:
server
- The server to create the entity on.uuid
- The UUID of the entity.
-
-
Method Details
-
simulatePlayerInteract
Simulates the Interaction of a Player with the Allay to set it's current item.- Parameters:
material
- TheMaterial
of the Item the Allay should collect
-
simulateItemRetrieval
Simulate the retrieval of the Allay's current items. -
simulateItemPickup
Simulate the Allay picking up anItemStack
from the ground. If the Itemstack is not of the current Type, this will throw aIllegalArgumentException
. If the Inventory is full, this will throw aIllegalStateException
.- Parameters:
item
- TheItemStack
to pick up
-
assertCurrentItem
- Parameters:
item
- TheMaterial
to pick up
-
assertCurrentItem
- Parameters:
item
- TheMaterial
to pick upmessage
- The message to display if the assertion fails
-
getInventory
- Specified by:
getInventory
in interfaceInventoryHolder
-
assertInventoryContains
Asserts that the Allay's inventory contains an item.- Parameters:
item
- The item to check.
-
assertInventoryContains
Asserts that the Allay's inventory contains an item.- Parameters:
item
- The item to check.s
- The message to fail with.
-
canDuplicate
public boolean canDuplicate()- Specified by:
canDuplicate
in interfaceAllay
-
setCanDuplicate
public void setCanDuplicate(boolean canDuplicate) - Specified by:
setCanDuplicate
in interfaceAllay
-
getDuplicationCooldown
public long getDuplicationCooldown()- Specified by:
getDuplicationCooldown
in interfaceAllay
-
setDuplicationCooldown
public void setDuplicationCooldown(long cooldown) - Specified by:
setDuplicationCooldown
in interfaceAllay
-
resetDuplicationCooldown
public void resetDuplicationCooldown()- Specified by:
resetDuplicationCooldown
in interfaceAllay
-
isDancing
public boolean isDancing() -
startDancing
- Specified by:
startDancing
in interfaceAllay
-
startDancing
public void startDancing()- Specified by:
startDancing
in interfaceAllay
-
stopDancing
public void stopDancing()- Specified by:
stopDancing
in interfaceAllay
-
duplicateAllay
- Specified by:
duplicateAllay
in interfaceAllay
-
getJukebox
- Specified by:
getJukebox
in interfaceAllay
-
getType
- Specified by:
getType
in interfaceEntity
- Overrides:
getType
in classEntityMock
-