Home›Java›Mods›ElytraEvents
ElytraEvents
ModsJava

ElytraEvents

Java mod listed for Minecraft 1.9. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Elytra Events
​
Elytra Events is useful API for developers to use until the official Spigot API supporting Elytra is released.This API enables the developer to work-around the use of NMS in their plugin and keep the code user-friendly. The API is very simple and forward to use in order to control nearly everything that takes place with the elytra and a player. ​

MANUAL:
In order to manually install Elytra Events and use it along side your plugin, download and install the plugin first to your server. Next, in order to use the API, you must add a reference to the jar file downloaded to your plugin project. To accomplish this with Intellij, follow this link. To accomplish this with Eclipse, follow this link.

MAVEN:
TODO
​
Example code for Elytra Events is as provided:​

PlayerElytraFlyEvent

NOTE: if you disable PlayerElytraFlyEvent without letting the player fly before hand, the player will never become in flight and will disable the elytra completely.
​
Code (Text):
private int flyRecursions = 0;


@EventHandler
public void onElytraMove(PlayerElytraFlyEvent event) {
    if (this.flyRecursions > 100) {
        event.setCancelled(true);
    } else {
        this.flyRecursions++;
    }
}

PlayerElytraEnableEvent
​
Code (Text):
@EventHandler
public void onElytraEnable(PlayerElytraEnableEvent event) {
    if (!event.getPlayer().hasPermisssion("elytra.use")) {
        event.setCancelled(true);
    }
}

PlayerElytraDisableEvent

NOTE: if you disable PlayerElytraDisableEvent, the player will fly infinitely without ever stopping. This may cause various visual glitches.
​
Code (Text):
@EventHandler
public void onElytraDisable(PlayerElytraDisableEvent event) {
    if (Main.getInstance().flyForever()) {
        event.setCancelled(true);
    }
}


SOON
​
GitHub​

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

ElytraEvents is a free Minecraft Java mod. Compatible with Minecraft 1.9. Downloaded 208 times (via Spigot). Download it and open it directly in the game.

Explore more