mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
Add API for controlling mob despawn away from players. Adds BUKKIT-2986
By: Travis Watkins <amaranth@ubuntu.com>
This commit is contained in:
parent
711f3f1007
commit
89d79e64db
1 changed files with 15 additions and 0 deletions
|
@ -278,4 +278,19 @@ public interface LivingEntity extends Entity {
|
|||
* @return true if there is a line of sight, false if not.
|
||||
*/
|
||||
public boolean hasLineOfSight(Entity other);
|
||||
|
||||
/**
|
||||
* Returns if the entity despawns when away from players or not.<br />
|
||||
* By default animals are not removed while other mobs are.
|
||||
*
|
||||
* @return true if the entity is removed when away from players
|
||||
*/
|
||||
public boolean getRemoveWhenFarAway();
|
||||
|
||||
/**
|
||||
* Sets whether or not the entity despawns when away from players or not.
|
||||
*
|
||||
* @param remove The remove status
|
||||
*/
|
||||
public void setRemoveWhenFarAway(boolean remove);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue