ElytraFly
General
what it does
Single plugin that handles everything elytra-related. No more juggling 3–4 separate plugins for the item, entity, fireworks boost, and flight physics. ElytraFly auto-detects your server kernel at runtime and loads only what's needed — this is a revolution among vanilla mechanics in PMMP.
Config
configuration
language: en # english or russian, default is en. Set ru for russian. elytra-durability: 432 # elytra durability elytra-breakable: true # can elytra break at all? true - yes / false - no elytra-in-creative: true # show elytra in creative mode? true - yes / false - no cancel-fall-damage: true # disable fall damage while gliding? true - yes / false - no. This is a somewhat broken feature — proper BDS physics are hard to port to PHP. If you manage to do it, pull requests are welcome on GitHub.
API
Took care of plugin developers too, both small ones and those using this in production. Add ElytraFly as a dependency in your plugin.yml:
softdepend:
- ElytraFly
Guard every call with a null-check first:
if ($this->getServer()->getPluginManager()->getPlugin('ElytraFly') === null) { return; }
Item checks:
use berg\ElytraFly\ElytraFlyAPI; // Get an elytra instance fireworks = ElytraFlyAPI::getFireworks(); // Give elytra to a player ElytraFlyAPI::giveElytra(player, count: 3); // Give fireworks — returns false on NetherGames player);
Armor slot and instance checks:
// Equip elytra ElytraFlyAPI::equipElytra(removed = ElytraFlyAPI::unequipElytra(equipped = ElytraFlyAPI::hasElytraEquipped(has = ElytraFlyAPI::hasElytraInInventory($player);
Player flight state checks:
// Is the player currently gliding? player); // Can the player glide? (elytra equipped + not broken) player); // Remaining durability — null if no elytra equipped player);
Debug strings — originally kept these for personal use, then decided to leave them in forever. Might come in handy:
// "PocketMine-MP" or "NetherGames" $kernel = ElytraFlyAPI::getKernel(); ElytraFlyAPI::isPMMP(); // bool ElytraFlyAPI::isNetherGames(); // bool