Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
LivingEntity.java
Go to the documentation of this file.
1 package org.bukkit.entity;
2 
3 import java.util.Collection;
4 import java.util.HashSet;
5 import java.util.List;
6 
7 import org.bukkit.Location;
8 import org.bukkit.block.Block;
9 import org.bukkit.inventory.EntityEquipment;
10 import org.bukkit.potion.PotionEffect;
11 import org.bukkit.potion.PotionEffectType;
12 
16 public interface LivingEntity extends Entity, Damageable {
22  public double getEyeHeight();
23 
30  public double getEyeHeight(boolean ignoreSneaking);
31 
37  public Location getEyeLocation();
38 
47  public List<Block> getLineOfSight(HashSet<Byte> transparent, int maxDistance);
48 
56  public Block getTargetBlock(HashSet<Byte> transparent, int maxDistance);
57 
66  public List<Block> getLastTwoTargetBlocks(HashSet<Byte> transparent, int maxDistance);
67 
74  @Deprecated
75  public Egg throwEgg();
76 
83  @Deprecated
84  public Snowball throwSnowball();
85 
92  @Deprecated
93  public Arrow shootArrow();
94 
102  public <T extends Projectile> T launchProjectile(Class<? extends T> projectile);
103 
109  public int getRemainingAir();
110 
116  public void setRemainingAir(int ticks);
117 
123  public int getMaximumAir();
124 
130  public void setMaximumAir(int ticks);
131 
139  public int getMaximumNoDamageTicks();
140 
146  public void setMaximumNoDamageTicks(int ticks);
147 
154  public int getLastDamage();
155 
161  public void setLastDamage(int damage);
162 
168  public int getNoDamageTicks();
169 
175  public void setNoDamageTicks(int ticks);
176 
184  public Player getKiller();
185 
193  public boolean addPotionEffect(PotionEffect effect);
194 
203  public boolean addPotionEffect(PotionEffect effect, boolean force);
204 
211  public boolean addPotionEffects(Collection<PotionEffect> effects);
212 
220  public boolean hasPotionEffect(PotionEffectType type);
221 
227  public void removePotionEffect(PotionEffectType type);
228 
234  public Collection<PotionEffect> getActivePotionEffects();
235 
243  public boolean hasLineOfSight(Entity other);
244 
251  public boolean getRemoveWhenFarAway();
252 
258  public void setRemoveWhenFarAway(boolean remove);
259 
265  public EntityEquipment getEquipment();
266 
272  public void setCanPickupItems(boolean pickup);
273 
279  public boolean getCanPickupItems();
280 }