Interface Trident
- All Superinterfaces:
AbstractArrow, Audience, CommandSender, DataComponentView, Entity, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, Projectile, ServerOperator, Sound.Emitter, ThrowableProjectile
Represents a thrown trident.
-
Nested Class Summary
Nested classes/interfaces inherited from interface AbstractArrow
AbstractArrow.PickupRule, AbstractArrow.PickupStatusNested classes/interfaces inherited from interface Entity
Entity.Spigot -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the base amount of damage this trident will do.intReturns the loyalty level of the trident.booleanGets if this trident has dealt damage to an entity yet or has hit the floor.booleanhasGlint()Returns whether the trident has an enchanted glow.voidsetDamage(double damage) Sets the base amount of damage this trident will do.voidsetGlint(boolean glint) Sets whether the trident has an enchanted glow.voidsetHasDealtDamage(boolean hasDealtDamage) Sets if this trident has dealt damage to an entity yet or has hit the floor.voidsetLoyaltyLevel(int loyaltyLevel) Sets the loyalty level of the trident.Methods inherited from interface AbstractArrow
getAttachedBlock, getAttachedBlocks, getHitSound, getItem, getItemStack, getKnockbackStrength, getLifetimeTicks, getPickupRule, getPickupStatus, getPierceLevel, getWeapon, isCritical, isInBlock, isShotFromCrossbow, setCritical, setHitSound, setItem, setItemStack, setKnockbackStrength, setLifetimeTicks, setPickupRule, setPickupStatus, setPierceLevel, setShooter, setShotFromCrossbow, setWeaponMethods inherited from interface Audience
clearResourcePacks, clearTitle, closeDialog, 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, showDialog, showTitle, stopSound, stopSoundMethods inherited from interface CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface DataComponentView
getData, getDataOrDefault, hasDataMethods inherited from interface Entity
addPassenger, addScoreboardTag, asHoverEvent, broadcastHurtAnimation, 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, getPickItemStack, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getVisualFire, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isTrackedBy, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, lookAt, lookAt, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvisible, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface HoverEventSource
asHoverEventMethods inherited from interface Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface PersistentDataHolder
getPersistentDataContainerMethods inherited from interface Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface Projectile
canHitEntity, doesBounce, getOwnerUniqueId, getShooter, hasBeenShot, hasLeftShooter, hitEntity, hitEntity, setBounce, setHasBeenShot, setHasLeftShooter, setShooterMethods inherited from interface ServerOperator
isOp, setOpMethods inherited from interface 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:
setDamagein 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:
getDamagein interfaceAbstractArrow- Returns:
- base damage amount
-