Jump to content

[Solved] Make the player fall


scoob27

Recommended Posts

Hi everyone,

 

I have an item, which when in the armor slots, allows the player to fly. When the player removes the item he is not able to fly anymore so i disable the player.capabilities.allowFlying in the onLivingUpdateEvent(...) method. No problem with that.

 

But when i do so the player can still fly as long as he doesn't touch the ground. So my question is how can i make the player to fall when he removes the item ? Just like the player falls when he goes from creative to survival  while flying.

 

Is there a method i can call or something like that ?

 

Thanks for your help :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.