Package be.seeseemelk.mockbukkit.entity
Class AllayMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.LivingEntityMock
be.seeseemelk.mockbukkit.entity.MobMock
be.seeseemelk.mockbukkit.entity.CreatureMock
be.seeseemelk.mockbukkit.entity.AllayMock
- All Implemented Interfaces:
MessageTarget,io.papermc.paper.entity.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>,org.bukkit.attribute.Attributable,org.bukkit.command.CommandSender,org.bukkit.entity.Allay,org.bukkit.entity.Creature,org.bukkit.entity.Damageable,org.bukkit.entity.Entity,org.bukkit.entity.LivingEntity,org.bukkit.entity.Mob,org.bukkit.inventory.InventoryHolder,org.bukkit.loot.Lootable,org.bukkit.metadata.Metadatable,org.bukkit.Nameable,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator,org.bukkit.persistence.PersistentDataHolder,org.bukkit.projectiles.ProjectileSource
Mock implementation of an
Allay.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot -
Field Summary
Fields inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
alive, attributes, healthFields inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertCurrentItem(@NotNull org.bukkit.Material item) Asserts that the Allay uses the givenMaterialto pick up anItemStackfrom the ground.voidassertCurrentItem(@NotNull org.bukkit.Material item, @Nullable String message) Asserts that the Allay uses the givenMaterialto pick up anItemStackfrom the ground.voidassertInventoryContains(org.bukkit.inventory.ItemStack item) Asserts that the Allay's inventory contains an item.voidassertInventoryContains(org.bukkit.inventory.ItemStack item, String s) Asserts that the Allay's inventory contains an item.boolean@Nullable org.bukkit.entity.Allaylong@NotNull org.bukkit.inventory.Inventory@Nullable org.bukkit.Locationorg.bukkit.entity.EntityTypegetType()booleanvoidvoidsetCanDuplicate(boolean canDuplicate) voidsetDuplicationCooldown(long cooldown) voidsimulateItemPickup(@NotNull org.bukkit.inventory.ItemStack item) Simulate the Allay picking up anItemStackfrom the ground.@Nullable org.bukkit.inventory.ItemStackSimulate the retrieval of the Allay's current items.voidsimulatePlayerInteract(@NotNull org.bukkit.Material material) Simulates the Interaction of a Player with the Allay to set it's current item.voidvoidstartDancing(@NotNull org.bukkit.Location location) voidMethods inherited from class be.seeseemelk.mockbukkit.entity.MobMock
finalizeSpawn, getAmbientSound, getHeadRotationSpeed, getLootTable, getMaxHeadPitch, getPathfinder, getPossibleExperienceReward, getSeed, getTarget, isAggressive, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAggressive, setAware, setLeftHanded, setLootTable, setSeed, setTargetMethods inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
addPotionEffect, addPotionEffect, addPotionEffect, addPotionEffects, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, canUseEquipmentSlot, clearActiveItem, clearActivePotionEffects, completeUsingActiveItem, damage, damage, damage, damageItemStack, damageItemStack, getAbsorptionAmount, getActiveItem, getActiveItemHand, getActiveItemRemainingTime, getActiveItemUsedTime, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getForwardsMovement, getFrictionState, getHandRaised, getHandRaisedTime, getHealth, getHurtDirection, getHurtSound, getItemInUse, getItemInUseTicks, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNextArrowRemoval, getNextBeeStingerRemoval, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSidewaysMovement, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, getUpwardsMovement, hasActiveItem, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, heal, isClimbing, isCollidable, isDead, isGliding, isHandRaised, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, isValid, knockback, launchProjectile, launchProjectile, launchProjectile, playHurtAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, registerAttribute, remove, removePotionEffect, resetMaxHealth, setAbsorptionAmount, setActiveItemRemainingTime, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setFrictionState, setGliding, setHealth, setHurtDirection, setItemInUseTicks, setJumping, setKiller, setLastDamage, setLeashHolder, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNextArrowRemoval, setNextBeeStingerRemoval, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, simulateDamage, simulateDamage, startUsingItem, swingMainHand, swingOffHand, teleportMethods inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, asHoverEvent, assertLocation, assertNotTeleported, assertTeleported, clearMetadata, clearTeleported, collidesAt, copy, copy, createSnapshot, customName, customName, eject, equals, fromMobSpawner, getAsString, getBoundingBox, getChunk, getCustomName, getEffectivePermissions, getEntityId, getEntityProperty, 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, getTrackedBy, getTrackedPlayers, getTransitivePassengers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hashCode, hasMetadata, hasNoPhysics, hasPassengers, hasPermission, hasPermission, hasTeleported, isCustomNameVisible, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, 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, setInvisible, setInvulnerable, setLastDamageCause, setLocation, setMetadata, setName, setNoPhysics, setOp, setPassenger, setPersistent, setPortalCooldown, setPose, setRotation, setSilent, setSneaking, setSpawnReason, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleportAsync, teleportWithoutEvent, wouldCollideUsingMethods 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 org.bukkit.attribute.Attributable
getAttribute, registerAttributeMethods 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
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Damageable
damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, heal, heal, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealthMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getAsString, 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, getTrackedBy, getTrackedPlayers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface io.papermc.paper.entity.Frictional
getFrictionState, setFrictionStateMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, canUseEquipmentSlot, clearActiveItem, clearActivePotionEffects, completeUsingActiveItem, damageItemStack, damageItemStack, getActiveItem, getActiveItemHand, getActiveItemRemainingTime, getActiveItemUsedTime, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getForwardsMovement, getHandRaised, getHandRaisedTime, getHurtDirection, getHurtSound, getItemInUse, getItemInUseTicks, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNextArrowRemoval, getNextBeeStingerRemoval, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSidewaysMovement, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, getUpwardsMovement, hasActiveItem, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, knockback, playHurtAnimation, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, rayTraceEntities, removePotionEffect, setActiveItemRemainingTime, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setItemInUseTicks, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNextArrowRemoval, setNextBeeStingerRemoval, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, startUsingItem, swingHand, swingMainHand, swingOffHandMethods inherited from interface org.bukkit.loot.Lootable
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setSeedMethods inherited from interface be.seeseemelk.mockbukkit.command.MessageTarget
assertNoMoreSaid, assertSaid, assertSaid, nextMessageMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.entity.Mob
getAmbientSound, getEquipment, getHeadRotationSpeed, getMaxHeadPitch, getPathfinder, getPossibleExperienceReward, getTarget, isAggressive, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAggressive, setAware, setLeftHanded, setLootTable, setTargetMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile, launchProjectileMethods 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
public void simulatePlayerInteract(@NotNull @NotNull org.bukkit.Material material) Simulates the Interaction of a Player with the Allay to set it's current item.- Parameters:
material- TheMaterialof the Item the Allay should collect
-
simulateItemRetrieval
@Nullable public @Nullable org.bukkit.inventory.ItemStack simulateItemRetrieval()Simulate the retrieval of the Allay's current items.- Returns:
- A
ListofItemStacks that the Allay is holding
-
simulateItemPickup
public void simulateItemPickup(@NotNull @NotNull org.bukkit.inventory.ItemStack item) Simulate the Allay picking up anItemStackfrom 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- TheItemStackto pick up
-
assertCurrentItem
public void assertCurrentItem(@NotNull @NotNull org.bukkit.Material item) Asserts that the Allay uses the givenMaterialto pick up anItemStackfrom the ground.- Parameters:
item- TheMaterialto pick up
-
assertCurrentItem
public void assertCurrentItem(@NotNull @NotNull org.bukkit.Material item, @Nullable @Nullable String message) Asserts that the Allay uses the givenMaterialto pick up anItemStackfrom the ground.- Parameters:
item- TheMaterialto pick upmessage- The message to display if the assertion fails
-
getInventory
@NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()- Specified by:
getInventoryin interfaceorg.bukkit.inventory.InventoryHolder
-
assertInventoryContains
public void assertInventoryContains(org.bukkit.inventory.ItemStack item) 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:
canDuplicatein interfaceorg.bukkit.entity.Allay
-
setCanDuplicate
public void setCanDuplicate(boolean canDuplicate) - Specified by:
setCanDuplicatein interfaceorg.bukkit.entity.Allay
-
getDuplicationCooldown
public long getDuplicationCooldown()- Specified by:
getDuplicationCooldownin interfaceorg.bukkit.entity.Allay
-
setDuplicationCooldown
public void setDuplicationCooldown(long cooldown) - Specified by:
setDuplicationCooldownin interfaceorg.bukkit.entity.Allay
-
resetDuplicationCooldown
public void resetDuplicationCooldown()- Specified by:
resetDuplicationCooldownin interfaceorg.bukkit.entity.Allay
-
isDancing
public boolean isDancing()- Specified by:
isDancingin interfaceorg.bukkit.entity.Allay
-
startDancing
public void startDancing(@NotNull @NotNull org.bukkit.Location location) - Specified by:
startDancingin interfaceorg.bukkit.entity.Allay
-
startDancing
public void startDancing()- Specified by:
startDancingin interfaceorg.bukkit.entity.Allay
-
stopDancing
public void stopDancing()- Specified by:
stopDancingin interfaceorg.bukkit.entity.Allay
-
duplicateAllay
@Nullable public @Nullable org.bukkit.entity.Allay duplicateAllay()- Specified by:
duplicateAllayin interfaceorg.bukkit.entity.Allay
-
getJukebox
@Nullable public @Nullable org.bukkit.Location getJukebox()- Specified by:
getJukeboxin interfaceorg.bukkit.entity.Allay
-
getType
public org.bukkit.entity.EntityType getType()- Specified by:
getTypein interfaceorg.bukkit.entity.Entity- Overrides:
getTypein classEntityMock
-