Skip to content

Commit

Permalink
Explicit types for 1.14 and 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Sep 20, 2021
1 parent 981c1a7 commit f9bb877
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -1188,8 +1188,9 @@ public void setSneaking(org.bukkit.entity.Entity entity, boolean sneaking) {
if (entity instanceof Player) {
((Player) entity).setSneaking(sneaking);
}
EntityPose pose = sneaking ? EntityPose.SNEAKING : EntityPose.STANDING;
try {
ENTITY_SETPOSE.invoke(getHandle(entity), sneaking ? EntityPose.SNEAKING : EntityPose.STANDING);
ENTITY_SETPOSE.invoke(getHandle(entity), pose);
} catch (Throwable e) {
e.printStackTrace();
}
Expand Down
Expand Up @@ -1206,8 +1206,9 @@ public void setSneaking(org.bukkit.entity.Entity entity, boolean sneaking) {
if (entity instanceof Player) {
((Player) entity).setSneaking(sneaking);
}
EntityPose pose = sneaking ? EntityPose.CROUCHING : EntityPose.STANDING;
try {
ENTITY_SETPOSE.invoke(getHandle(entity), sneaking ? EntityPose.CROUCHING : EntityPose.STANDING);
ENTITY_SETPOSE.invoke(getHandle(entity), pose);
} catch (Throwable e) {
e.printStackTrace();
}
Expand Down

0 comments on commit f9bb877

Please sign in to comment.