Interface Guardian
- All Superinterfaces:
- Attributable,- CommandSender,- Creature,- Damageable,- Enemy,- Entity,- LivingEntity,- Lootable,- Metadatable,- Mob,- Monster,- Nameable,- Permissible,- PersistentDataHolder,- ProjectileSource,- ServerOperator
- All Known Subinterfaces:
- ElderGuardian
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.bukkit.entity.EntityEntity.Spigot
- 
Method SummaryModifier and TypeMethodDescriptionintGet the duration (in ticks) that a laser attack takes.intGet the amount of ticks that have elapsed since this guardian has initiated a laser attack.booleanhasLaser()Gets whether the guardian laser is active or not.booleanisElder()Deprecated.booleanisMoving()Check whether or not this guardian is moving.voidsetElder(boolean shouldBeElder) Deprecated.Must spawn a newElderGuardian.booleansetLaser(boolean activated) Sets whether the guardian laser should show or not.voidsetLaserTicks(int ticks) Set the amount of ticks that have elapsed since this guardian has initiated a laser attack.Methods inherited from interface org.bukkit.attribute.AttributablegetAttributeMethods inherited from interface org.bukkit.command.CommandSendergetName, sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from interface org.bukkit.entity.Damageabledamage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealthMethods inherited from interface org.bukkit.entity.EntityaddPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleportMethods inherited from interface org.bukkit.entity.LivingEntityaddPotionEffect, addPotionEffect, addPotionEffects, attack, canBreatheUnderwater, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHurtSound, getItemInUse, getItemInUseTicks, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isLeashed, isRiptiding, isSleeping, isSwimming, playHurtAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setItemInUseTicks, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setRiptiding, setSwimming, swingMainHand, swingOffHandMethods inherited from interface org.bukkit.loot.LootablegetLootTable, getSeed, setLootTable, setSeedMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.entity.MobgetAmbientSound, getTarget, isAware, setAware, setTargetMethods inherited from interface org.bukkit.NameablegetCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.PermissibleaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainerMethods inherited from interface org.bukkit.projectiles.ProjectileSourcelaunchProjectile, launchProjectileMethods inherited from interface org.bukkit.permissions.ServerOperatorisOp, setOp
- 
Method Details- 
setLaserboolean setLaser(boolean activated) Sets whether the guardian laser should show or not. A target must be present. If no target is present the laser will not show and the method will return false.- Parameters:
- activated- whether the laser is active
- Returns:
- true if the laser was activated otherwise false
- See Also:
 
- 
hasLaserboolean hasLaser()Gets whether the guardian laser is active or not.- Returns:
- true if the laser is active otherwise false
 
- 
getLaserDurationint getLaserDuration()Get the duration (in ticks) that a laser attack takes.- Returns:
- the laser duration in ticks
 
- 
setLaserTicksvoid setLaserTicks(int ticks) Set the amount of ticks that have elapsed since this guardian has initiated a laser attack. If set togetLaserDuration()or greater, the guardian will inflict damage upon its target and the laser attack will complete.For this value to have any effect, the guardian must have an active target (see Mob.setTarget(LivingEntity)) and be charging a laser attack (wherehasLaser()is true). The client may display a different animation of the guardian laser than the set ticks.- Parameters:
- ticks- the ticks to set. Must be at least -10
 
- 
getLaserTicksint getLaserTicks()Get the amount of ticks that have elapsed since this guardian has initiated a laser attack.This value may or may not be significant depending on whether or not the guardian has an active target ( Mob.getTarget()) and is charging a laser attack (hasLaser()). This value is not reset after a successful attack nor used in the next and will be reset to the minimum value when the guardian initiates a new one.- Returns:
- the laser ticks ranging from -10 to getLaserDuration()
 
- 
isElderDeprecated.should check if instance ofElderGuardian.Check if the Guardian is an elder Guardian- Returns:
- true if the Guardian is an Elder Guardian, false if not
 
- 
setElderDeprecated.Must spawn a newElderGuardian.- Parameters:
- shouldBeElder- shouldBeElder
 
- 
isMovingboolean isMoving()Check whether or not this guardian is moving.While moving, the guardian's spikes are retracted and will not inflict thorns damage upon entities that attack it. Additionally, a moving guardian cannot attack another entity. If stationary (i.e. this method returns false), thorns damage is guaranteed and the guardian may initiate laser attacks.- Returns:
- true if moving, false if stationary
 
 
- 
ElderGuardian.