Vanilla mechanics of elytra flights for NG and PMMP
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.
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.
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
$elytra = ElytraFlyAPI::getElytra();
// Get a fireworks instance — null on NetherGames
$fireworks = ElytraFlyAPI::getFireworks();
// Give elytra to a player
ElytraFlyAPI::giveElytra($player);
ElytraFlyAPI::giveElytra($player, count: 3);
// Give fireworks — returns false on NetherGames
$success = ElytraFlyAPI::giveFireworks($player);
Armor slot and instance checks:
// Equip elytra
ElytraFlyAPI::equipElytra($player);
// Remove elytra if equipped — false if slot was empty
$removed = ElytraFlyAPI::unequipElytra($player);
// Check if elytra is in the chestplate slot
$equipped = ElytraFlyAPI::hasElytraEquipped($player);
// Check if elytra exists anywhere in inventory
$has = ElytraFlyAPI::hasElytraInInventory($player);
Player flight state checks:
// Is the player currently gliding?
$gliding = ElytraFlyAPI::isGliding($player);
// Can the player glide? (elytra equipped + not broken)
$canGlide = ElytraFlyAPI::canGlide($player);
// Remaining durability — null if no elytra equipped
$durability = ElytraFlyAPI::getElytraDurability($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
Один плагин закрывает всё что связано с элитрами. Больше не надо держать 3–4 отдельных плагина для предмета, сущности, буста фейерверками и физики полёта. ElytraFly определяет ядро в рантайме и грузит только то, чего не хватает, это революция среди ванильных механик в пммп
language: en # русский или английский, по дэфолту en английский, поставь ru - чтобы стать Zа наших.
elytra-durability: 432 # прочность элитр
elytra-breakable: true # есть ли вообще разрушимость у элитр? true - да / false - нет
elytra-in-creative: true # будут ли элитры в творческом режиме? true - да / false - нет
cancel-fall-damage: true # отключать ли урон от падения на элитрах? true - да / false - нет. Это очень сломанная функция, так как у меня не получается перенести физику из BDS в PHP, если у вас получится перенести, то делайте pull-request на гитхабе
Также позаботился о маленьких разработчиках, и те что будут использовать плагин именно в продакшене. Добавь ElytraFly как зависимость в plugin.yml:
softdepend:
- ElytraFly
перед каждым вызовом проверяй что плагин загружен:
if ($this->getServer()->getPluginManager()->getPlugin('ElytraFly') === null) {
return;
}
далее у нас проверка предмета
use berg\ElytraFly\ElytraFlyAPI;
// Получить экземпляр элитры
$elytra = ElytraFlyAPI::getElytra();
// Получить фейерверк — null на NetherGames
$fireworks = ElytraFlyAPI::getFireworks();
// Выдать элитру игроку
ElytraFlyAPI::giveElytra($player);
ElytraFlyAPI::giveElytra($player, count: 3);
// Выдать фейерверк — вернёт false на NetherGames
$success = ElytraFlyAPI::giveFireworks($player);
теперь проверка слотов и экземляров
// Надеть элитру
ElytraFlyAPI::equipElytra($player);
// Снять элитру если надета — false если слот был пуст
$removed = ElytraFlyAPI::unequipElytra($player);
// Надета ли элитра в слоте нагрудника
$equipped = ElytraFlyAPI::hasElytraEquipped($player);
// Есть ли элитра где-то в инвентаре
$has = ElytraFlyAPI::hasElytraInInventory($player);
тут расписал как работает проверка полета игрока
// Летит ли игрок прямо сейчас
$gliding = ElytraFlyAPI::isGliding($player);
// Может ли игрок полететь (элитра надета + не сломана)
$canGlide = ElytraFlyAPI::canGlide($player);
// Текущая прочность — null если элитра не надета
$durability = ElytraFlyAPI::getElytraDurability($player);
прочие дебаг строки, которые изначально вынес для себя, а потом решил оставить в плагине навсегда, возможно понадобится:
// "PocketMine-MP" или "NetherGames-MC"
$kernel = ElytraFlyAPI::getKernel();
ElytraFlyAPI::isPMMP(); // bool
ElytraFlyAPI::isNetherGames(); // bool
Закидывай ссылкой в нейросеть, или скачай readme.md и закинь внутрь нейронки, она быстро изучит api и напишет плагин используя стабильный api моего плагина.
p.s: readme.md и сам плагин писался без ИИ, так что есть смысл использовать именно этот плагин! ну делал как обычно пацик с России, поэтому денег не прошу, пользуйтесь на здоровье. дайте лучше заказов побольше, лады?
почекайте тут: https://nikitaberg.ru
Version: 1.0.0
Downloads: 33
Updated: 6/22/2026
Supported API versions: 5.0.0 to 5.36.0
Categories: Vanilla Mechanics, API plugins, Mechanics, General
License: LGPL-3.0-ONLY