Java Code Examples for org.bukkit.entity.LivingEntity#isLeashed()
The following examples show how to use
org.bukkit.entity.LivingEntity#isLeashed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SuperLeadTool.java From NBTEditor with GNU General Public License v3.0 | 5 votes |
private static List<LivingEntity> findLeashPrisoners(Entity holder) { List<LivingEntity> entities = new ArrayList<LivingEntity>(); for (LivingEntity living : holder.getWorld().getEntitiesByClass(LivingEntity.class)) { if (living.isLeashed() && living.getLeashHolder().equals(holder)) { entities.add(living); } } return entities; }
Example 2
Source File: CondLeashed.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public boolean check(LivingEntity entity) { return entity.isLeashed(); }
Example 3
Source File: ExprLeashHolder.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override @Nullable public Entity convert(LivingEntity entity) { return entity.isLeashed() ? entity.getLeashHolder() : null; }