Package org.bukkit.entity
Interface Trident
- All Superinterfaces:
AbstractArrow
,Audience
,CommandSender
,Entity
,HoverEventSource<HoverEvent.ShowEntity>
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Pointered
,Projectile
,ServerOperator
,Sound.Emitter
,ThrowableProjectile
Represents a thrown trident.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.AbstractArrow
AbstractArrow.PickupRule, AbstractArrow.PickupStatus
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the base amount of damage this trident will do.int
Returns the loyalty level of the trident.boolean
Gets if this trident has dealt damage to an entity yet or has hit the floor.boolean
hasGlint()
Returns whether the trident has an enchanted glow.void
setDamage
(double damage) Sets the base amount of damage this trident will do.void
setGlint
(boolean glint) Sets whether the trident has an enchanted glow.void
setHasDealtDamage
(boolean hasDealtDamage) Sets if this trident has dealt damage to an entity yet or has hit the floor.void
setLoyaltyLevel
(int loyaltyLevel) Sets the loyalty level of the trident.Methods inherited from interface org.bukkit.entity.AbstractArrow
getAttachedBlock, getHitSound, getItemStack, getKnockbackStrength, getLifetimeTicks, getPickupRule, getPickupStatus, getPierceLevel, hasNoPhysics, isCritical, isInBlock, isShotFromCrossbow, setCritical, setHitSound, setKnockbackStrength, setLifetimeTicks, setNoPhysics, setPickupRule, setPickupStatus, setPierceLevel, setShotFromCrossbow
Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, 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, 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.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getRider, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasRider, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isImmuneToFire, isInBubbleColumn, isInDaylight, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isRidable, isRidableInWater, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setImmuneToFire, 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 net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
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.entity.Projectile
canHitEntity, doesBounce, getOwnerUniqueId, getShooter, hasBeenShot, hasLeftShooter, hitEntity, hitEntity, setBounce, setHasBeenShot, setHasLeftShooter, setShooter
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
Methods inherited from interface org.bukkit.entity.ThrowableProjectile
getItem, setItem
-
Method Details
-
hasGlint
boolean hasGlint()Returns whether the trident has an enchanted glow. This can be separate from the underlying item having any enchantments.- Returns:
- whether the trident has an enchanted glow
-
setGlint
void setGlint(boolean glint) Sets whether the trident has an enchanted glow. This is separate from the underlying item having any enchantments.- Parameters:
glint
- whether the trident should have an enchanted glow
-
getLoyaltyLevel
int getLoyaltyLevel()Returns the loyalty level of the trident. This can be separate from the underlying item's enchantments.- Returns:
- loyalty level of the trident
-
setLoyaltyLevel
void setLoyaltyLevel(int loyaltyLevel) Sets the loyalty level of the trident. This is separate from the underlying item's enchantments.- Parameters:
loyaltyLevel
- loyalty level- Throws:
IllegalArgumentException
- if the loyalty level is lower than 0 or greater than 127
-
hasDealtDamage
boolean hasDealtDamage()Gets if this trident has dealt damage to an entity yet or has hit the floor. If neither of these events have occurred yet, this will return false.- Returns:
- has dealt damage
-
setHasDealtDamage
void setHasDealtDamage(boolean hasDealtDamage) Sets if this trident has dealt damage to an entity yet or has hit the floor.- Parameters:
hasDealtDamage
- has dealt damage or hit the floor
-
setDamage
void setDamage(double damage) Sets the base amount of damage this trident will do.- Specified by:
setDamage
in interfaceAbstractArrow
- Parameters:
damage
- new damage amount
-
getDamage
double getDamage()Gets the base amount of damage this trident will do. Defaults to 8.0 for a normal trident with0.5 * (1 + power level)
added for trident fired from damage enchanted bows.- Specified by:
getDamage
in interfaceAbstractArrow
- Returns:
- base damage amount
-