You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wiki
The vanilla client sends this packet when the player starts/stops flying (like in creative mode).
Describe the solution you'd like
Add a component IsCreativeFlying on Player entities that track if a player is flying or not, and add a event CreativeFlyingChange. When this packet is recived we update the IsCreativeFlying component and issue the CreativeFlyingChange event.
Somewhere we also need to keep track if the player needs to be kicked if they are not in creative mode, but that could reasonably be handled elsewhere, or left out for plugins to handle.
Create a is_creative_flying_check system in feather/server/src/systems that listens for the CreativeFlyingChange event and kicks players if they are not in creative mode (and they are turning flying on).
Note however that the main maintainer Caelum, is rewriting the ecs, so some methods might soon move to a different file, but the function will probably be the same.
The text was updated successfully, but these errors were encountered:
Feature Request
Handle PlayerAbilities request in feather/server/src/packet_handlers.rs
Description
wiki
The vanilla client sends this packet when the player starts/stops flying (like in creative mode).
Describe the solution you'd like
Add a component IsCreativeFlying on Player entities that track if a player is flying or not, and add a event CreativeFlyingChange. When this packet is recived we update the IsCreativeFlying component and issue the CreativeFlyingChange event.
Somewhere we also need to keep track if the player needs to be kicked if they are not in creative mode, but that could reasonably be handled elsewhere, or left out for plugins to handle.
1)
Create a IsCreativeFlying component in quill.
2)
Create a CreativeFlyingChange Event. This is almost the same steps as for 1), but you should look at quill/common/events
3)
Add a handle function in feather/server/src/packet_handlers.rs for handling the PlayerAbilities packet, that issues the event and updates the component. For an example on how to trigger the event go to feather/server/src/packet_handlers/interaction.rs, or go directly to the method.
4)
Create a is_creative_flying_check system in feather/server/src/systems that listens for the CreativeFlyingChange event and kicks players if they are not in creative mode (and they are turning flying on).
Note however that the main maintainer Caelum, is rewriting the ecs, so some methods might soon move to a different file, but the function will probably be the same.
The text was updated successfully, but these errors were encountered: