SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot 2021-07-22 09:36:51 +10:00
parent be93ac366d
commit 95cc961f13
2 changed files with 21 additions and 1 deletions

View File

@ -114,7 +114,7 @@ public enum EntityEffect {
*/
ENTITY_POOF(20, LivingEntity.class),
/**
* Guardian sets laser target.
* Guardian plays the attack sound effect.
*/
GUARDIAN_TARGET(21, Guardian.class),
// 22-28 player internal flags

View File

@ -2,6 +2,26 @@ package org.bukkit.entity;
public interface Guardian extends Monster {
/**
* 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.
*
* @param activated whether the laser is active
* @return true if the laser was activated otherwise false
* @see #getTarget()
* @see #setTarget(LivingEntity)
*/
boolean setLaser(boolean activated);
/**
* Gets whether the guardian laser is active or not.
*
* @return true if the laser is active otherwise false
*/
boolean hasLaser();
/**
* Check if the Guardian is an elder Guardian
*