ModsJava
ElytraEvents
Java mod listed for Minecraft 1.9. Downloads from the MC Java Mods app on Android.
⬇ Download on Spigot
Elytra Events
- Overview:
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.
- Installation:
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
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
- Usage:
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.
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++;
}
}
@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);
}
}
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.
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);
}
}
public void onElytraDisable(PlayerElytraDisableEvent event) {
if (Main.getInstance().flyForever()) {
event.setCancelled(true);
}
}
- Java Docs:
SOON
- Source:
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
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.