mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Add Sneaking API for Entities
This commit is contained in:
parent
981cf9de7a
commit
f64904e777
@ -870,6 +870,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return Pose.values()[this.getHandle().getPose().ordinal()];
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@Override
|
||||
public void setSneaking(boolean sneak) {
|
||||
this.getHandle().setShiftKeyDown(sneak);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSneaking() {
|
||||
return this.getHandle().isShiftKeyDown();
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Override
|
||||
public SpawnCategory getSpawnCategory() {
|
||||
return CraftSpawnCategory.toBukkit(this.getHandle().getType().getCategory());
|
||||
|
Loading…
Reference in New Issue
Block a user