Add EntityToggleSwimEvent and isSwimming / setSwimming API

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-15 16:17:35 +10:00
parent 444ecb9903
commit 11cdaa50a3
3 changed files with 36 additions and 6 deletions

View File

@@ -469,6 +469,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
getHandle().setFlag(7, gliding);
}
@Override
public boolean isSwimming() {
return getHandle().bb();
}
@Override
public void setSwimming(boolean swimming) {
getHandle().g(swimming);
}
@Override
public AttributeInstance getAttribute(Attribute attribute) {
return getHandle().craftAttributes.getAttribute(attribute);