Get/Set Vanilla Player "Abilities"
PongoSapiens opened this issue ยท 1 comments
Feature request name
Get/Set Vanilla Player "Abilities"
Feature request description
I would like to be able to read and set (where appropriate) values under the "abilities" tag in the Player.dat data. This currently includes:
walkSpeed: The walking speed, always 0.1.
flySpeed: The flying speed, always 0.05.
mayfly: 1 or 0 (true/false) - true if the player can fly.
flying: 1 or 0 (true/false) - true if the player is currently flying.
invulnerable: 1 or 0 (true/false) - true if the player is immune to all damage and harmful effects.
mayBuild: 1 or 0 (true/false) - true if the player can place and destroy blocks.
instabuild: 1 or 0 (true/false) - true if the player can instantly destroy blocks.
Feature request reason
The ability to conditionally modify abilities would enhance mod pack makers reach, for instance:
- disabling creative flight, however it was acquired, for certain boss fights.
- grant creative flight in a void dimension intended to be outer space.
- remove the ability to place/remove blocks in certain areas or dimensions.
Feature request dependencies
This seems like it would be a relatively trivial change to the existing player object, and has no external dependencies. I will probably eventually try to implement this myself, but as I currently have no experience in writing/modifying mods, I'm not sure how long it will take me.