Interface Guardian

All Superinterfaces:
Attributable, Audience, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter
All Known Subinterfaces:
ElderGuardian

public interface Guardian extends Monster
  • Method Details

    • setLaser

      boolean 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:
    • hasLaser

      boolean hasLaser()
      Gets whether the guardian laser is active or not.
      Returns:
      true if the laser is active otherwise false
    • isElder

      @Deprecated boolean isElder()
      Deprecated.
      should check if instance of ElderGuardian.
      Check if the Guardian is an elder Guardian
      Returns:
      true if the Guardian is an Elder Guardian, false if not
    • setElder

      @Deprecated void setElder(boolean shouldBeElder)
      Deprecated.
      Must spawn a new ElderGuardian.
      Parameters:
      shouldBeElder - shouldBeElder