Package be.seeseemelk.mockbukkit.entity
Class SimpleEntityMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.SimpleEntityMock
- 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>,CommandSender,Entity,Metadatable,Nameable,Permissible,ServerOperator,PersistentDataHolder
A very simple class that allows one to create an instance of an entity when a specific type of entity is not
required. This should only be used for testing code that doesn't care what type of entity it is.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot -
Constructor Summary
ConstructorsConstructorDescriptionSimpleEntityMock(@NotNull ServerMock server) Creates aSimpleEntityMockwith a random UUID.SimpleEntityMock(@NotNull ServerMock server, @NotNull UUID uuid) Creates aSimpleEntityMockwith a specified UUID. -
Method Summary
Modifier and TypeMethodDescription@NotNull BoundingBox@NotNull BlockFace@NotNull PosegetPose()@NotNull EntityTypegetType()booleanvoidsetPersistent(boolean persistent) Methods inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, asHoverEvent, assertLocation, assertNotTeleported, assertTeleported, clearTeleported, collidesAt, customName, customName, eject, equals, fromMobSpawner, getChunk, getCustomName, getEffectivePermissions, getEntityId, getEntitySpawnReason, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getMetadata, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getScoreboardEntry, getScoreboardTags, getServer, getSpawnCategory, getTeleportCause, getTicksLived, getTrackedPlayers, 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, isSilent, isTicking, isValid, 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, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, 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 net.kyori.adventure.audience.Audience
clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
sendMessage, sendMessage, sendPlainMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Entity
asHoverEvent, teleport, teleport, 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
-
Constructor Details
-
SimpleEntityMock
Creates aSimpleEntityMockwith a specified UUID.- Parameters:
server- The server this entity lives on.uuid- The UUID that the entity should have.
-
SimpleEntityMock
Creates aSimpleEntityMockwith a random UUID.- Parameters:
server- The server this entity lives on.
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceEntity- Overrides:
getTypein classEntityMock
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfaceEntity- Overrides:
isPersistentin classEntityMock
-
setPersistent
public void setPersistent(boolean persistent) - Specified by:
setPersistentin interfaceEntity- Overrides:
setPersistentin classEntityMock
-
getBoundingBox
- Specified by:
getBoundingBoxin interfaceEntity- Overrides:
getBoundingBoxin classEntityMock
-
getFacing
- Specified by:
getFacingin interfaceEntity- Overrides:
getFacingin classEntityMock
-
getPose
- Specified by:
getPosein interfaceEntity- Overrides:
getPosein classEntityMock
-